4

I have a simple python route as follows:-

@app.route('/api/customer/', methods=['PUT']) def check(): data=request.json return data

I'm trying to call this python route using suite script in Oracle Netsuite. Here is the code for Requesting part of my suitescript.

nlapiRequestUrl(url,data,headers,'PUT')

var jsonVar = [{"email":"john@email.com","lastname":"Famous","firstname":"John"}];
var data = JSON.stringify(jsonVar);

When I am executing my suite script, I am Getting the following error in the netsuite app. Error

It would be a great help if some one can give me a head's up.

Thanks in advance,

Sudhir kumar
  • 549
  • 2
  • 8
  • 31
durga
  • 115
  • 11

1 Answers1

0

Try changing this:

   @app.route('/api/customer/', methods=['PUT'])
    def check():
        """
        return the data in the request
        """
        return json_result(request.json)
Houssem Chouia
  • 93
  • 3
  • 12