Skip to content

Instantly share code, notes, and snippets.

@kfcampbell
Forked from pengwynn/curl-ua.shell
Created October 27, 2023 19:05
Show Gist options
  • Save kfcampbell/e7c77049e8a3b561799259aa164b5163 to your computer and use it in GitHub Desktop.
Save kfcampbell/e7c77049e8a3b561799259aa164b5163 to your computer and use it in GitHub Desktop.
Pass a User-Agent header with curl
curl -v --user-agent "dartvoid/0.1 (https://github.com/dartvoid\) terminal/0.0" https://api.github.com/users/dartvoid
* About to connect() to api.github.com port 443 (#0)
* Trying 207.97.227.243...
* connected
* Connected to api.github.com (207.97.227.243) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using RC4-SHA
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.com
* start date: 2012-04-30 00:00:00 GMT
* expire date: 2014-07-09 12:00:00 GMT
* subjectAltName: api.github.com matched
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Assurance CA-3
* SSL certificate verify ok.
> GET /users/dartvoid HTTP/1.1
> User-Agent: dartvoid/0.1 (https://github.com/dartvoid\) terminal/0.0
> Host: api.github.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: GitHub.com
< Date: Fri, 03 May 2013 01:15:05 GMT
< Content-Type: application/json; charset=utf-8
< Connection: keep-alive
< Status: 200 OK
< X-RateLimit-Limit: 60
< X-RateLimit-Remaining: 52
< Vary: Accept
< Cache-Control: public, max-age=60, s-maxage=60
< Last-Modified: Wed, 23 Jan 2013 21:33:21 GMT
< ETag: "772bb597a8eafec0ba9ba9dd158e318c"
< X-GitHub-Media-Type: github.beta
< X-Content-Type-Options: nosniff
< Content-Length: 1252
< Access-Control-Allow-Credentials: true
< Access-Control-Expose-Headers: Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-OAuth-Scopes, X-Accepted-OAuth-Scopes
< Access-Control-Allow-Origin: *
< Vary: Accept-Encoding
<
* Connection #0 to host api.github.com left intact
{"login":"DartVoid","id":2447961,"avatar_url":"https://secure.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-org-420.png","gravatar_id":"d41d8cd98f00b204e9800998ecf8427e","url":"https://api.github.com/users/DartVoid","html_url":"https://github.com/DartVoid","followers_url":"https://api.github.com/users/DartVoid/followers","following_url":"https://api.github.com/users/DartVoid/following","gists_url":"https://api.github.com/users/DartVoid/gists{/gist_id}","starred_url":"https://api.github.com/users/DartVoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartVoid/subscriptions","organizations_url":"https://api.github.com/users/DartVoid/orgs","repos_url":"https://api.github.com/users/DartVoid/repos","events_url":"https://api.github.com/users/DartVoid/events{/privacy}","received_events_url":"https://api.github.com/users/DartVoid/received_events","type":"Organization","name":"DartVoid","company":null,"blog":"dartvoid.com","location":"Umeå","email":"social@dartvoid.com","hireable":false,"bio":null,"public_repos":1,"followers":0,"following":0,"created_at":"2012-09-28T19:58:36Z","updated_at":"2013-01-23T21:33:21Z","public_gists":0}* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment