Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code examples in building-a-login-with-github-button-with-a-github-app.md #35414

Merged
merged 3 commits into from
Dec 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update building-a-login-with-github-button-with-a-github-app.md
Remove unnecessary body from http get request
arthurgubaidullin committed Nov 29, 2024
commit 66eb58fd4804da8f518d2366f33eb9fc5003de47
Original file line number Diff line number Diff line change
@@ -257,12 +257,10 @@ These steps lead you through writing code to generate a user access token. To sk
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)