API now ignores content-type header (to increase compatibility with Java backend)
This commit is contained in:
@@ -11,7 +11,7 @@ app = Flask(__name__)
|
||||
@app.route("/xpath", methods=["POST"])
|
||||
def xpath():
|
||||
start = time.time_ns()
|
||||
request_data = request.get_json()
|
||||
request_data = json.loads(request.get_data(as_text=True))
|
||||
xml = request_data['data']
|
||||
xpath = request_data['process']
|
||||
|
||||
@@ -31,7 +31,7 @@ def xpath():
|
||||
@app.route("/xsd", methods=["POST"])
|
||||
def xsd():
|
||||
start = time.time_ns()
|
||||
request_data = request.get_json()
|
||||
request_data = json.loads(request.get_data(as_text=True))
|
||||
xml = request_data['data']
|
||||
xsd = request_data['process']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user