1、获取本机IP:http://httpbin.org/ip
2、获取用户代理
https://httpbin.org/user-agent
https://httpbin.org/
httpbin(1): HTTP Request & Response Service
Freely hosted in , , & flavors by &.
BONUSPOINTS
- The current time, in a variety of formats.
ENDPOINTS
- This page.
- Returns Origin IP.
- Returns user-agent.
- Returns header dict.
- Returns GET data.
/post
Returns POST data./patch
Returns PATCH data./put
Returns PUT data./delete
Returns DELETE data- Returns request data, including method used.
/anything/:anything
Returns request data, including the URL.- Returns page containing UTF-8 data.
- Returns gzip-encoded data.
- Returns deflate-encoded data.
- Returns brotli-encoded data.
- Returns given HTTP Status code.
- Returns given response headers.
- 302 Redirects n times.
- 302 Redirects to the foo URL.
- 307 Redirects to thefoo URL.
- 302 Relative redirects n times.
- 302 Absolute redirects n times.
- Returns cookie data.
- Sets one or more simple cookies.
- Deletes one or more simple cookies.
- Challenges HTTPBasic Auth.
- 404'd BasicAuth.
- Challenges HTTP Digest Auth.
- Challenges HTTP Digest Auth.
- Streams min(n, 100) lines.
- Delays responding for min(n, 10) seconds.
- Drips data over a duration after an optional initial delay, then (optionally) returns with the given status code.
- Streams n bytes, and allows specifying a Range header to select a subset of the data. Accepts a chunk_size and request duration parameter.
- Renders an HTML Page.
- Returns some robots.txt rules.
- Denied by robots.txt file.
- Returns 200 unless an If-Modified-Since or If-None-Match header is provided, when it returns a 304.
- Assumes the resource has the given etag and responds to If-None-Match header with a 200 or 304 and If-Match with a 200 or 412 as appropriate.
- Sets a Cache-Control header for n seconds.
- Generates n random bytes of binary data, accepts optional seed integer parameter.
- Streams n random bytes of binary data in chunked encoding, accepts optional seed and chunk_size integer parameters.
- Returns page containing n HTML links.
- Returns page containing an image based on sent Accept header.
- Returns a PNG image.
- Returns a JPEG image.
- Returns a WEBP image.
- Returns a SVG image.
- HTML form that submits to /post
- Returns some XML