Skip to content

Commit

Permalink
Update building-a-login-with-github-button-with-a-github-app.md
Browse files Browse the repository at this point in the history
Remove unnecessary body from http get request
  • Loading branch information
arthurgubaidullin authored Nov 25, 2024
1 parent 5c9b0b1 commit b7a2e8e
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,10 @@ def user_info(token)
uri = URI("{% data variables.product.rest_url %}/user")

result = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
body = {"access_token" => token}.to_json

auth = "Bearer #{token}"
headers = {"Accept" => "application/json", "Content-Type" => "application/json", "Authorization" => auth}

http.send_request("GET", uri.path, body, headers)
http.send_request("GET", uri.path, nil, headers)
end

parse_response(result)
Expand Down

0 comments on commit b7a2e8e

Please sign in to comment.