Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us at Qlik Connect 2026 in Orlando, April 13–15: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
EGuarato1648206044
Contributor III
Contributor III

tRestClient PUT issue Body

Hello,

i just use and PUT Api call with postman with the parameter body = none and it works.

I create a job in talend Open Studio for Data Integration (8.0.1.20211109_1610) and the component tRestClient return me this error , even if in the Advanced Settings we Disable chucked encoding. We tried also to put Content-Length = 0 or = "0" but we get the same error.

statusCode body string

411|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<HTML><HEAD><TITLE>Length Required</TITLE>

<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>

<BODY><h2>Length Required</h2>

<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>

</BODY></HTML>

Labels (3)
1 Solution

Accepted Solutions
EGuarato1648206044
Contributor III
Contributor III
Author

Hi, I tried it in the first place.

I had to switch to tJavaRow with some issue as well that i solved luckily.

 

EDIT: still looking for an answer. There are other post like mine with the same problem more or less unsolved.

EDIT: Reused trest component and it worked. I put more parameter using also the hidden ones on POST-MAN. I inserted a random body that means nothing.

View solution in original post

7 Replies
gjeremy1617088143

Hi @Enrico Guarato​ , so have you try to set the same parameter : body = none in tRestClient ?

EGuarato1648206044
Contributor III
Contributor III
Author

no, because you can't do that.

gjeremy1617088143

Have you try to use the same header than your postman call ?

EGuarato1648206044
Contributor III
Contributor III
Author

Hi Jeremy. I'm using the exactly same call i made in postman. I used also fiddler to check if there was other hidden parameters.

GET and POST works fine.

gjeremy1617088143

Could you try to use the tRest component instead of tRestClient component ?

EGuarato1648206044
Contributor III
Contributor III
Author

Hi, I tried it in the first place.

I had to switch to tJavaRow with some issue as well that i solved luckily.

 

EDIT: still looking for an answer. There are other post like mine with the same problem more or less unsolved.

EDIT: Reused trest component and it worked. I put more parameter using also the hidden ones on POST-MAN. I inserted a random body that means nothing.

mora_s
Contributor
Contributor

We were getting these 411 errors for one of our API endpoints as well. Initially we researched potentially sending a content-length header, and while double-checking the format, MDN provided some interesting insight: 

From MDN:

The HTTP Content-Length header indicates the size, in bytes, of the message body sent to the recipient.

Content-Length is limited in that the message size must be known up front, before sending the headers, which is a problem when content is dynamically generated or streamed.

  • In HTTP/1.0, it is required.
  • In HTTP/1.1, it could be replaced with Transfer-Encoding: chunked for responses sent out in parts as its size is calculated.
  • In HTTP/2, Content-Length is redundant, because the content length may be inferred from DATA frames. It may still be included for backwards compatibility.

Full article:
Content-Length header - HTTP | MDN

In our case, we were able to go into the Advanced settings of the tRestClient component and enable the 'Force HTTP 1.1' option, then leave the chunked encoding active (i.e. leave the 'Disable Chunked Encoding' unchecked), which seems to have made the tRestClient behave as described in the second bullet point above, and we no longer recieved the 411 error.