Hello Wendy,
There are two things that you need to fix in your code:
1) Scriptr.io automatically calculates the content-length of your content, so you should not pass the content-length header field yourself.
2) There is a mistake in your code. You are sending “rawBody” instead of “bodyString” as in the below:
var test = "foo bar";
return http.request({
url : "http://mysterious-sierra-8455.herokuapp.com/abcd",
method : 'PUT',
headers : {
"Content-Type" : 'application/json',
},
"bodyString" : test
});
Please note that “rawBody” is for the “request” object not for “http”. Replace rawBody with bodyString and your code should work fine.
Regards,
Julien Mrad
Scriptr.io