Skip to content

Instantly share code, notes, and snippets.

@yokawasa
Last active October 16, 2024 00:09
Show Gist options
  • Save yokawasa/d879fa551cf34e8e3dc09a0cabc950ac to your computer and use it in GitHub Desktop.
Save yokawasa/d879fa551cf34e8e3dc09a0cabc950ac to your computer and use it in GitHub Desktop.
httpbin tips

Tips collection of httpbin usage

# status
curl -I -X GET https://httpbin.org/status/404

# cookie
curl https://httpbin.org/cookies

# redirect
curl -I https://httpbin.org/redirect-to?url=https://google.com

# delay (0 - 10 sec)
curl http://httpbin.org/delay/0.7

# response format: { html | json | xml } & image/{ (None) | jpeg | png }
curl https://httpbin.org/xml
curl https://httpbin.org/image/jpeg -o test.jpg

# client gip
curl https://httpbin.org/ip

# client ua
curl https://httpbin.org/user-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment