Endpoints for HTTP Testing
Example.org, Example.net, Example.com
The least exciting example, but a solid one nonetheless, the “example” domains are reserved exactly so that we can use them in all our various example code without annoying anyone when that code gets copied and pasted. I use these in places where I’m using code from a real project, but removing URLs to protect the innocent.
There’s more information about these domains (they have some examples with character encoding in URLs and things also) here: http://www.iana.org/domains/special
My favourite by far, this got quite a lot of use in the book! The source is available on github as well, so if you need to do in-house testing of any kind then you can make your own copy of this application.
- Visit the site and create a new “bin”
- Make requests to the endpoint you are given
- Visit the related view page to view exactly which requests were made, what headers were sent, and so on, all in a pretty graphical setting
This tool is also on github so you can grab, use and adapt it, which is fabulous for developers. It’s slightly more advanced than requestb.in because you can configure responses for particular requests, but still shows you great detail on what was sent and received, which is great. I didn’t use this much because I was really writing toy code but I can see it being a great tool for API development so I’m filing it for future use.
Perhaps a little less shiny than the others, but much more specific in the way it works. You request to different endpoints, and it returns information about what was in the request, rather than making requests from one tool, and viewing information in a web page. This seems like a perfect tool for testing HTTP clients, for example.
HTTP Testing Endpoints
Having taken the time to get to know some of these tools, I think I’ll be using them more in the future rather than the scrappy bits of PHP script that I usually throw together! These endpoints are an easy way for people to test without having to set anything else up, or could even be used for debugging without really knowing what too much about what is going on, for example emailing a requestb.in link with specific query data to check what other headers a client is sending in order to debug a request. There must be plenty of other possibilities too, do you use a tool like this? Leave me a comment!
Starting from version 6, PhpStorm will have a built-in plugin to test end-points too (http://blog.jetbrains.com/webide/2012/12/phpstorm-6-eap-build-124-373/). I didn’t test it but it sounds interesting.
Thought I would let you know Respondto’s domain expired.
Thanks for article!
For future surfers, respondto.it was renamed to httpresponder.com. (https://twitter.com/aaronlerch/status/557572906541010944)
I did nor know that! Thanks for taking the time to comment
What I think would be really useful is a tool whereby we can setup an endpoint base URI and then it collects any subsequent requests. For instance:
This would catch requests and report on them for the following:
We could use this as a permanent tool during testing of our application then.
Try to http://http-master.com
It’s realy easy tool to make http requests via GET, POST, PUT and other methods with body gziped or plain. You can add headers, follow redirects and do basic authentication.
Pingback: Capturing HTTP requests in an cloud world - I8C