Skip to content

Commit df799b1

Browse files
committed
Cosmetic change
1 parent ff37f29 commit df799b1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

get_data_from_earth.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
API_URI = URI.parse('https://clubs-api.raspberrypi.org/graphql')
1010

1111
HEADERS = {
12-
'accept' => 'application/json',
12+
'accept' => 'application/json',
1313
'content-type' => 'application/json'
1414
}
1515

@@ -53,11 +53,9 @@
5353
}
5454

5555
def request_data(variables:)
56-
req_options = {
57-
use_ssl: API_URI.scheme == 'https'
58-
}
5956
request = Net::HTTP::Post.new(API_URI.request_uri, HEADERS)
6057
request.body = { query: DOJOS_IN_COUNTRY_QUERY, variables: }.to_json
58+
req_options = { use_ssl: API_URI.scheme == 'https' }
6159

6260
response = Net::HTTP.start(API_URI.hostname, API_URI.port, req_options) do |http|
6361
http.request(request)

0 commit comments

Comments
 (0)