Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Httpbin – HTTP Client Testing Service (httpbin.org)
175 points by pandog on Sept 8, 2015 | hide | past | favorite | 38 comments


Thanks for reposting this. We recently took this over from Kenneth Reitz and I'd love to hear your suggestions for improvements or additions.


IPv6 support would be great (take a look at what http://icanhazip.com does: http://ipv4.icanhazip.com and http://ipv6.icanhazip.com)

Anyway, sounds really cool :)


Endpoints to test various SSL/TLS/X.509 stuff would be super helpful. Call would returning a stock HTTP response body, but with different changes to the SSL/TLS handshake (you will have to use different host names to do this)

https://expired.x509.httpbin.org/ - returns an otherwise valid cert that has expired

https://wrongcn.x509.httpbin.org/ - returns an otherwise valid cert with a different CN name

https://sslv3.tls.httpbin.org/ - only negotiates an SSLv3 connection

https//3des.tls.httpbin.org/ - only negotiates to use 3DES as the cipher


take a look at https://badssl.com ;)


Awesome! Is this your project? If so, email me john@runscope.com



We've discussed doing an "TLSBin" as you described (and still might) but it's a lot of work. We'd gladly sponsor one! This is something I wish Qualys/SSL Labs would do.


I've wanted the ability to combine things – e.g. setting headers on a non-200 response. It'd be nice if there was a way to combine supported options into a single request or at least as many as will fit in to the querystring.


You might like mocky.io, mockable.io or jsonstub.com


Indeed, thanks!


I'd like to see a method-neutral version of /get, /post, /patch et al - i.e. one that responds no matter what HTTP method is passed.

The response would then include "method": "BLAH" k/v indicating the method that was used.


try https://yourapihere.com :) (all other endpoints are the same as httpbin)


Just what I was after! Thanks :)


I tend to use http://requestb.in/ since it's a lot simpler to use. Basically press on the button in the middle, copy+paste url and then reload page once webhook is there.

Also, I created this nifty shorthand for use in the terminal:

    alias bin_me="curl --silent -X POST http://requestb.in/api/v1/bins | jq -r '\"http://requestb.in/\(.name)?inspect\"'"
Requires JQ (could easily not require that) and you'll just remove the ?inspect when you want to use the bin.


RequestBin isn't a substitute for HttpBin, they do 2 completely different things:

RequestBin = easily provision a url (useful for configuring a webhook) and inspect requests to that url.

HttpBin = pre-defined urls that return specific responses (headers & payloads). Good for testing http clients.

Fun fact: both tools are operated by the awesome people at http://Runscope.com.


Similar to RequestBin is http://posthere.io/

(Disclosure: I wrote it)


This solves a problem that requestb.in does not. Namely, endpoints that predictably return various HTTP headers or HTTP content. This isn't about just testing to see what your app is sending. This is about testing how your application or HTTP client or whatever handles various weird HTTP responses and features.

If I need to test how my application responds to a relative URL in a Location header, I can hit the /relative-redirect/:n endpoint. Same for Absolute urls via /absolute-redirect/:n. The If-Not-Modified stuff is also helpful.


This is a great service and I think it was the idea that then spawned another service - http://mockbin.org.

Funnily enough I use both depending on what I'm trying to achieve, with httpbin being more immediate and mockbin being for more in-depth/complex testing. Good job!


With output in JSON/YAML/XML: http://mockbin.com/ip


What is the "EU" flavour?


After seeing HTTP, then HTTPS, I was half-expecting the URL for that one to be eu://httpbin.org/


It was hosted in an EU-based datacenter on Heroku (to reduce latencies, not for any specific privacy reasons), but I need to check to see if we are still hosting it there.


Ah, okay. Because of the way it is listed I thought it was some protocol extension or other HTTP-related speciality, not a different location. Thanks for clearing that up.


I prefer this offer all of those "what is my IP?" web sites. No ads or captcha. Plus, it's in JSON.

http://httpbin.org/ip


http://ipinfo.io/ip (or http://ipinfo.io if you want geolocation info too).


Oh, fancy. Thanks for sharing this one.


You can also just Google it: https://www.google.com/#q=ip




Also https://canhazip.com/more or https://canhazip.com/headers if you want additional headers. v4 and v6 compatible, just use curl -4 or curl -6 (not dedicated subdomain right now, might add in the future).



jsonip.org too :)


https://wtfismyip.com/ is nice too, for headers and IP addresses.


Awesome service! We use it a lot in conjunction with other tools. Didn't know it's actually 4 years old already [1].

[1] https://news.ycombinator.com/item?id=2649326


Love it but our fucking Cisco ScanSafe keeps marking it as evil every time it updates.


Offtopic: how did he turn the README.rst into a webpage?


I think it was something called 'ronn' https://github.com/Runscope/httpbin/issues/200


Very useful site for testing purposes!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: