2017-05-31 62 views
0

我想在netsuite, 做我的脚本简单的POST请求,但我总是得到这个错误。Netsuite POST调用给出错误,Unsuported数字格式

{ 
    "error":{ 
     "code":"SYNTAX_ERROR", 
     "message":"SyntaxError: Unsuported number format: ------- (null$lib#3)" 
    } 
} 

我的剧本是这样的

function putRESTlet(dataIn) { 
    if ("command" in dataIn) { 
    return {"result": "command found"} 
    } else { 
    return {"result": "wrong command"} 
    } 
} 

function getRESTlet() { 
    return {"result":"Get result"} 
} 

GET调用工作正常,PUT & POST给我,错误

我不能明白为什么它使我这个错误的任何理由,因为我不使用任何数字。

+0

你在请求正文中发送了什么?您是否将内容类型设置为json? –

+0

是的,内容类型是application/json,有效载荷很简单 '{command:getInvoice}' – Tonis

回答

0

好吧,我自己发现它,我试图发送邮递员形式数据给Netsuite,然后netsuite不喜欢这种格式,现在我发送原始格式,它的工作原理。

相关问题