A web service that returns any http status code that you specified for testing the API?

A few months ago, I remember reading about a useful little web service that someone put together to test the API. Basically, you just made such a call, for example:

http://www.someAPItestingtool.com/status/405 

And the server would respond using 405 / Method Not Allowed .

It was just a handy little utility that you could use during development if you just wanted to interact with the current URL, which behaved the way you specified.

Today, my google-fu is weak, and I cannot let my life remember what it was called. I'm sure I could hack something like this for myself until he made me ask this question, but if anyone remembers what I'm talking about, maybe you can share it?

Many thanks...

Edit: Added something that I quickly whipped, but I'm still interested in the answer if someone knows what I mean ...

+6
python api web-services testing
source share
2 answers

Over a year later, I finally stumbled upon a service that I was thinking about:

http://httpstat.us/

+6
source

I'm still pretty sure that someone put something similar together, but it was faster for me to just crack something using Flask:

 from flask import Flask, make_response app = Flask(__name__) @app.route('/<int:status_code>') def return_status(status_code): response = make_response() response.status_code = status_code response.data = response.status return response if __name__ == '__main__': app.run() 
+5
source

All Articles