API now ignores content-type header (to increase compatibility with Java backend)

This commit is contained in:
2023-01-30 10:53:39 +01:00
parent a914282a5d
commit 3817b1ac5a

View File

@@ -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']