We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff37f29 commit df799b1Copy full SHA for df799b1
get_data_from_earth.rb
@@ -9,7 +9,7 @@
9
API_URI = URI.parse('https://clubs-api.raspberrypi.org/graphql')
10
11
HEADERS = {
12
- 'accept' => 'application/json',
+ 'accept' => 'application/json',
13
'content-type' => 'application/json'
14
}
15
@@ -53,11 +53,9 @@
53
54
55
def request_data(variables:)
56
- req_options = {
57
- use_ssl: API_URI.scheme == 'https'
58
- }
59
request = Net::HTTP::Post.new(API_URI.request_uri, HEADERS)
60
request.body = { query: DOJOS_IN_COUNTRY_QUERY, variables: }.to_json
+ req_options = { use_ssl: API_URI.scheme == 'https' }
61
62
response = Net::HTTP.start(API_URI.hostname, API_URI.port, req_options) do |http|
63
http.request(request)
0 commit comments