-
-
Save insanitybit/fbe0cbdd327f21f1e0061bd93be76681 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -H "Authorization: bearer AAAAAAAAAAABBBBBBBBBB" -X POST -d " \ | |
{ \ | |
\"query\": \"query { viewer { login }}\" \ | |
} \ | |
" https://api.github.com/graphql | |
let res = client | |
.post("https://api.github.com/graphql") | |
.bearer_auth("AAAAAAAAAAABBBBBBBBBB") | |
.json( | |
&serde_json::json!({ | |
"query": "query { viewer { login }}" | |
}) | |
) | |
.send() | |
.await?; | |
Returns: | |
[src/lib.rs:43] res = Response { | |
url: "https://api.github.com/graphql", | |
status: 403, | |
headers: { | |
"cache-control": "no-cache", | |
"connection": "close", | |
"content-type": "text/html; charset=utf-8", | |
"strict-transport-security": "max-age=31536000", | |
"x-content-type-options": "nosniff", | |
"x-frame-options": "deny", | |
"x-xss-protection": "1; mode=block", | |
"content-security-policy": "default-src 'none'; style-src 'unsafe-inline'", | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment