Commit cef7d97e authored by Krit Punpreuk's avatar Krit Punpreuk

Update perform.js

parent 976d613f
...@@ -55,9 +55,11 @@ function perform_function(context,request,response){ ...@@ -55,9 +55,11 @@ function perform_function(context,request,response){
// Setup Body if POST or PUT // Setup Body if POST or PUT
if(method == 'POST' || method == 'PUT') { if(method == 'POST' || method == 'PUT') {
//if(typeof param.body == 'object') { if(option.headers.content-type && option.headers.content-type == 'application/json') {
option.body = JSON.parse(body) option.body = JSON.parse(body)
//} } else {
option.body = body
}
} }
send_request(option,function(err){ send_request(option,function(err){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment