photo via Corey Templeton via CC License
Well, this post is simple, HTTP POST is relatively complex than HTTP GET, some times you want to do a quick test with your post data.
Here are the solutions I know. If you have any other solutions, let me know.
A Free POST Only Test Sever
Access: http://www.posttestserver.com/post.php. This will dump all the http data for you. A good/bad approach of this site I like is that this site will record your request and you can review your request later. But we are not always just want to view the data in web page, sometimes, we also want to use it in unit test.
For example I had posted a request and your can see it here: http://www.posttestserver.com/data/2012/05/11/00.24.01738126829
It’s a test from an iOS App I recently work on.
The Ultimate Solution for Testing HTTP Request
This is the BEST site I know for test HTTP request. As it listed on the home page, there many test endpoint:
ENDPOINTS
/
This page./ip
Returns Origin IP./user-agent
Returns user-agent./headers
Returns header dict./get
Returns GET data./post
Returns POST data./put
Returns PUT data./delete
Returns DELETE data./gzip
Returns gzip-encoded data./status/:code
Returns given HTTP Status code./response-headers?key=val
Returns given response headers./redirect/:n
302 Redirects n times./relative-redirect/:n
302 Relative redirects n times./cookies
Returns cookie data./cookies/set/:name/:value
Sets a simple cookie./basic-auth/:user/:passwd
Challenges HTTPBasic Auth./hidden-basic-auth/:user/:passwd
404′d BasicAuth./digest-auth/:qop/:user/:passwd
Challenges HTTP Digest Auth./stream/:n
Streams n–100 lines./delay/:n
Delays responding for n–10 seconds.
This site is really awesome! Just try it!
Any suggestion?
If you have any suggestion or better solutions, please leave a comment.
Of course, don’t forget to follow me @TonnyXu and Facebook
Via Tonny Xu http://feedproxy.google.com/~r/tonnyxu/~3/woj9p1nMg6s/ iPhone Dev
No comments:
Post a Comment