Super Contributor.. Super Contributor..
Super Contributor..

HTTP CLIENT POST operation without extra headers


I'm trying to submit a POST request with no body to a remote API. The HTTP CLIENT POST Operation with CP Base 1.7.0 but I'm getting weird errors back from my application regarding chunking or content-length headers missing..

<!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>

Using wireshark it seems OO is automagically adding  an Accept-Encoding:gzip, deflate header which appears to be generating the error. I have removed all extra options from the HTTP CLIENT POST operation except headers, url and method but there is no change.

I am able to successfully submit the POST request manually via POSTMAN without errors so I know the query works when not sent by OO.

Can anyone help with a solution please?



1 Reply
Super Contributor.. Super Contributor..
Super Contributor..

As mentioned in a similar post I have had to use Invoke-RestMethod via Powershell to perform the post without additional headers. Less than ideal but gets the job done.

If anyone is able to assist with the original issue I'd still like to hear it.


The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.