Edgebin is a HTTP testing service, with a focus on edge deployment.
Inspired by the httpbin.org, it leverages the power of edge computing to deliver fast, reliable testing capabilities tailored for modern distributed networks.
- Cloudflare Workers. https://edgebin.liujiacai.net
- Deno Deploy in deno branch. https://deno.edgebin.liujiacai.net/
Supports most of the endpoints from the original httpbin.org, including:
- HTTP methods
- Authentication
- Request inspection
- Response inspection
- Dynamic data
- Status codes
- Redirects
- Cookies
- Cache
- Anything
All endpoints accept any HTTP method. Additionally, it includes features not found in the original httpbin:
-
/ip returns the requester's IP address along with geolocation information such as country, region, city, ASN, and more.
{ "origin": "2408:8240:e10:947c:2806:6bb2:c222:343c", "continent": "AS", "latitude": "30.29365", "longitude": "120.16142", "country": "CN", "region": "Zhejiang", "regionCode": "ZJ", "city": "Hangzhou", "postalCode": "310000", "timezone": "Asia/Shanghai", "asn": 4837, "asOrganization": "China Unicom", "colo": "LAX" } -
/wsechoes back any message sent to it over a WebSocket connection. You can test it using wscat:wscat -c wss://edgebin.liujiacai.net/ws
-
/qrcode generates QR codes(svg) for any text or URL. Use query parameters to customize the output:
text: The text or URL to encode (required)errorCorrectionLevel: Error correction level, one ofL,M,Q,H. Default isH.width: Width of the QR code in pixels. Default is350.margin: Define how much wide the quiet zone should be. Default is4.scale: Scale factor. A value of 1 means 1px per modules (black dots). Default is4.
-
/md2html,/html2mdconverts between html and markdown. Use following methods to pass data:POSTrequest with raw bodyurlquery parameter to convert a webpagetextquery parameter to convert a short text.
curl "https://edgebin.liujiacai.net/md2html" --data "# Hello, World" curl "https://edgebin.liujiacai.net/html2md" --data "<h1>Hello, World</h1>"
-
/page-meta: Fetches a webpage and extracts its metadata (title, description, image, etc.). Use the
urlquery parameter to specify the target webpage. -
/date: Returns current date and time. Supports the following query parameters to control output:
format: Output format. One ofiso,locale,ts,timestamp,utc. Default isiso.locale: BCP47 locale string, e.g.,en-US,zh-CN. Used whenformat=locale.timeZone: IANA time zone, e.g.,Asia/Shanghai.
-
/mixreturns what you send in the request body, and supports specific query strings as directives to construct a custom response.s=code, sets the status code, e.g.s=418h=key:value, adds a response header, e.g.h=Content-Type:text/plaind=delay, delays the response bydelayseconds, e.g.d=3
/get: Returns GET data/ip: Returns the requester's IP address/ipgeo: Returns the requester's IP address and geolocation information/user-agent: Returns the requester's User-Agent/headers: Returns the requester's HTTP headers/status/:code: Returns a response with the given status code/anything: Returns anything that was sent in the request/delay/:n: Delays responding fornseconds/redirect/:n: Redirectsntimes/basic-auth/:user/:passwd: Challenges HTTP Basic Auth/bearer: Challenges HTTP Bearer Auth/cache/:max-age: Returns a response withCache-Control: public, max-age=60/response-headers?key=value: Returns a response with the given headers/bytes/:n: Returnsnrandom bytes/xml: Returns a sample XML document/html: Returns a sample HTML document/json: Returns a sample JSON document/gzip: Returns a gzip-encoded response/brotli: Returns a brotli-encoded response/deflate: Returns a deflate-encoded response/anything/:anything: Returns anything that was sent in the request/cookies: Returns the requester's cookies/cookies/set?name=value: Sets cookies and redirects to/cookies/cookies/delete?name=value: Deletes cookies and redirects to/cookies/image/:type: Returns a random image of the given type (png, jpeg, webp, svg)
If you find an endpoint is missing or notice any unexpected behavior, we welcome you to open an issue or submit a pull request.
Feel free to deploy your own instance of httpbin. The free tier of Cloudflare Workers is sufficient for most use cases.
If you'd like to share your public instance, please let us know and we'll add it to the list.
We have a Telegram group for discussion: https://t.me/edgebin.
| Instance | Maintainer |
|---|---|
| https://edgebin.liujiacai.net | @jiacai2050 |
# clone the repo and install dependencies
git clone https://github.com/jiacai2050/edgebin.git && cd edgebin
npm install
# start development server, listen on http://localhost:8787
npm run dev
# Deploy to Cloudflare Workers
# Make sure to set up your Cloudflare Workers environment first
# https://developers.cloudflare.com/workers/get-started/guide/
npm run deployIn the future, we may support other edge platforms like Vercel Edge Functions and Deno Deploy.