POST request require a Content length header

4,689 views
Skip to first unread message

gaston...@gigas.com

unread,
Jan 9, 2017, 10:07:49 AM1/9/17
to Fujitsu RunMyProcess Developer Community
Hello,

Since January 5/6 i am getting an error with my Google APIs connectors.
I can do GET requests as always, but i now can't do POST requests on google APIs.
I am getting this response:

<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 411 (Length Required)!!1</title>
www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>411.</b> <ins>That’s an error.</ins>
<p>POST requests require a <code>Content-length</code> header. <ins>That’s all we know.</ins>

My P_status variable on POST requests is:
{"code":411,"name":"Length Required","desc":"The server refuses to accept the request without a defined content length"}

I have been using this APIs for months without problem and now I can't use this. Is very important to solve this problem as soon as posible.

Have you changed something related to this problem in these days?

I am using OAuth2 authentication with a composite API, and the connectors use that composite API for authentication.
GET request are working well as always, but now I can't make POST requests.

Thank you

gaston...@gigas.com

unread,
Jan 9, 2017, 10:09:13 AM1/9/17
to Fujitsu RunMyProcess Developer Community, gaston...@gigas.com
PD: I have tried setting the "Content-Length" header mannualy in the connector custom-headers, but it doesn't work.

Dipen Raval

unread,
Jan 9, 2017, 10:46:56 AM1/9/17
to suppor...@runmyprocess.com, gaston...@gigas.com
Hi,

As per the error, it seems that some configuration issue.

Could you please share some mentioned points-

1. Which Google API you are trying to access. (Google Provider and Connector name)?
2. Please share the configuration of your provider and connector.
3. Once you tried to add the content-length manually in the Advance parameter then still you are getting the same result?

Kindly let us know above details so that we can help you to resolve your query.

Thanks,
Dipen Raval

On Mon, Jan 9, 2017 at 8:39 PM, <gaston...@gigas.com> wrote:
PD: I have tried setting the "Content-Length" header mannualy in the connector custom-headers, but it doesn't work.

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/6acc450a-2880-43a0-803f-19e7293f7db1%40runmyprocess.com.

gaston...@gigas.com

unread,
Jan 9, 2017, 3:31:10 PM1/9/17
to Fujitsu RunMyProcess Developer Community, gaston...@gigas.com
1. I am trying to access both google spreadsheets and google drive APIs. Both are giving the same result (error code 411 - Content length required....), only when i make POST requests (the GET requests are working fine).

2. I've attached the configuration screenshots of providers and connectors.

3. Yes, after adding the Content-Length header in advanced parameters i am getting exactly the same result. I have tried even adding the Content-Length header to the authentication connector.

The thing is that my configuration has been working well for months until this 5 or 6 of January.

Thank you

Captura de pantalla 2017-01-09 a las 21.11.50.png
Captura de pantalla 2017-01-09 a las 21.12.16.png
Captura de pantalla 2017-01-09 a las 21.12.36.png
Captura de pantalla 2017-01-09 a las 21.13.33.png
Captura de pantalla 2017-01-09 a las 21.13.54.png

Ankita Shrinath

unread,
Jan 10, 2017, 5:31:44 AM1/10/17
to suppor...@runmyprocess.com, gaston...@gigas.com
Hi There,

Please find the issue and its solution-

As per the error you are recieving is due to empty "content" in the connector. The connector requires some content in the body to evaluate and response accordingly.

As you are using POST request to DRIVE-copy file,Update worksheet cells (the body can not leave as empty).
You have to pass some JSON structure (eg. { } ) or you can pass some parameter in the content as per the requirement. 

Ex:
" <#if name?? &&name != "">
{"name":"${name}"}
</#if> "  in DRIVE-copy file (content)
which already present in the RMP connector library for DRIVE-copy file.

Please use mentioned configuration in both connectors and let us know if it helps.

If still you are facing same issue please let us know.

Regards,
Ankita

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

gaston...@gigas.com

unread,
Jan 10, 2017, 8:23:58 AM1/10/17
to Fujitsu RunMyProcess Developer Community, gaston...@gigas.com
Hello again,

I have tried writing an empty JSON in the POST body (content) and it is working now.
From this point, I can find a solution for this.
Just for curiosity, do you now why is this problem happening since 5 or 6 of January? I have been researching the google APIs documentation and issues, looking for a change or deprecation of some APIs but i can't find nothing related to this.

Thank you very much for your help

Ankita Shrinath

unread,
Jan 12, 2017, 9:17:30 AM1/12/17
to suppor...@runmyprocess.com, gaston...@gigas.com
Hi there,

It's good to hear that your issue has been resolved.

I have checked the Google API Documentation for spreadsheets, they have released the V4 API documentation so probably there may be some changes/updates. Google has made in the new and previous (v3) version,so this may be the reason you are facing this issue.
Also possible reason that some changes has been made in the account.

Hope this helps you.

Regards,
Ankita

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
Message has been deleted
Message has been deleted

ravi.vija...@gmail.com

unread,
Oct 24, 2017, 6:29:38 AM10/24/17
to Fujitsu RunMyProcess Developer Community, gaston...@gigas.com
Hi,

I have same error as above, could you please help me rectify it?

I tried empty json, but did not seem to help me (I am guessing i have done something wrong, not able to figure out what).

Here is the simple thing I am trying

function doPost(e) {
var params = JSON.stringify(e);
var response = sendFailResponse("200", "Success");
return ContentService.createTextOutput(JSON.stringify(response)).setMimeType(ContentService.MimeType.JSON);
}

function sendFailResponse(code, message) {
return {
status: {
code: code,
message: message
},
payload: {
}
};
}

And here is how i am calling it:

curl -X POST -d "param1=value1&param2=value2" -L https://script.google.com/a/XYZ/macros/s/XXXXXXX/exec --header "Content-Type:text/xml"

I end up with same error as above.

Any quick suggestions would be appreciated.

Regards,
R

Ghanshyam Mule

unread,
Nov 13, 2017, 5:06:09 PM11/13/17
to suppor...@runmyprocess.com, ravi.vija...@gmail.com
Hi Ravi,

Generally above error is due to empty body content & we need to provide some content in the body to evaluate and will get response accordingly.

Could please check/verify google connector configuration parameter & url content if it is correct definitely you will get 200  status code.

Please don't hesitate to contact us for any further query.

regards,
Ghanshyam





--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

Prachi Chandak

unread,
Nov 17, 2017, 9:32:18 AM11/17/17
to ravi.vija...@gmail.com, Fujitsu RunMyProcess Developer Community
Hi Ravi,

Are you able to resolve the error ?
Awaiting for your response.

Please don't hesitate to contact us for any further query.


Thanks & Regards,
Prachi Chandak
Fujitsu RunMyProcess Support

Dipen Raval

unread,
Nov 19, 2017, 2:55:42 AM11/19/17
to Fujitsu RunMyProcess Developer Community, ravi.vija...@gmail.com
Hi Ravi,

Good Day.

Could you please confirm that issue has been clarified?
Please don't hesitate to contact us for any further query.

Thanks & Regards,
Dipen Raval
Fujitsu - RunMyProcess Support

shraddhap...@gmail.com

unread,
Nov 21, 2017, 2:09:15 AM11/21/17
to Fujitsu RunMyProcess Developer Community, gaston...@gigas.com, suppor...@runmyprocess.com
Hi Ravi

Good day.

Please confirm if your issue is resolved.
Awaiting for your response.


Regards,
Shraddha Pangantiwar
RunMyProcess Support

Ravi Vijaykumar

unread,
Nov 21, 2017, 2:52:49 PM11/21/17
to suppor...@runmyprocess.com, gaston...@gigas.com, suppor...@runmyprocess.com
Hi Shraddha,

Thanks for following up. Issue is not yet resolved. When I execute the curl command mentioned above, it just fails to get any response. I have used -d to pass param, tried string way as mentioned above, also tried putting everything in a json file and yet same issue. 

Would you be able to share a small example:

Just execute curl command and with doPost in Google script to receive it and do something with params maybe send it back? I wrote to Google as well, and I checked their scripts bug log, seems like it is a defect with app script doPost.

Apologize Prachi/Ghanshyam/Dipen for not replying earlier as I have been traveling couldn't reply.

I sent same email earlier not sure if it has reached you or not.

Regards,
Ravi

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/d9vdhrJRcOo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

Ghanshyam Mule

unread,
Nov 22, 2017, 11:51:21 AM11/22/17
to suppor...@runmyprocess.com, Ravi Vijaykumar, gaston...@gigas.com, suppor...@runmyprocess.com
Hi Ravi,

You can refer example of Google script which retrieves  information from RunMyProcess Collection using Web service(Get Method)

Hope this helps you.

regards,
Ghanshyam

You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

Ravi Vijaykumar

unread,
Nov 22, 2017, 12:14:46 PM11/22/17
to Ghanshyam Mule, suppor...@runmyprocess.com, gaston...@gigas.com, Support System
Thanks Ghanshyam,

I actually saw few of those examples already. All of it is a Get request. Which works fine. In my case I am looking forward for a Post request and want to send a json file.

Never-mind please go ahead and close the ticket, I have kept it open for a long time already.

Regards,
Ravi
Reply all
Reply to author
Forward
0 new messages