Advanced REST client is a great test tool for developing a REST server. Without this, I had to make a request using curl
in command line. curl
is not hard to use. But Advanced REST client
is not only super easy to use but full-featured. Moreover I do not need to develop a client to test it.
The problem was developing client while server was also in progress. I could not find the test method. I wrote this code to capture all requests using flask
. This program returns necessary information with Content-Type: application/json
.
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/', defaults={'path': ''}, methods=['GET', 'POST', 'PUT', 'DELETE'])
@app.route('/<path:path>', methods=['GET', 'POST', 'PUT', 'DELETE'])
def echo(path):
return jsonify(headers=str(request.headers),
args=request.args,
form=request.form,
method=request.method,
path=request.path,
url=request.url)
if __name__ == '__main__':
app.run(debug=True)
My question is: Is there a server version analogous to Advanced REST client?
Note that: This question is transferred from SO and Web Applications.