We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ac391df + 0a84b6c commit daa74d1Copy full SHA for daa74d1
lib/nomad/client.rb
@@ -135,7 +135,15 @@ def get_allocation_info(alloc_id)
135
136
# Function to make GET requests with headers
137
def get_request(path)
138
+ # Collect query parameters in a dictionary (hash)
139
+ params = {
140
+ # by default we're only getting default namespace, use * to get all namespaces
141
+ 'namespace' => '*',
142
+ # we don't need any of this and it's big part of the responses
143
+ 'task_states' => 'false'
144
+ }
145
uri = URI("#{@nomad_addr}#{path}")
146
+ uri.query = URI.encode_www_form(params)
147
request = Net::HTTP::Get.new(uri)
148
request['X-Nomad-Token'] = @nomad_token
149
0 commit comments