[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] HTTP 411 Length Required



Hello,

Yes, 1.40 is a new version.  You previously said 1.4, which is different than 1.40.  You might think of 1.4 as "1.04" (though, I referred to it as 1.4 at the time.)

The reason your first example doesn't work is because you've passed *OMIT for both the string to send and the file to send.  This is how HTTPAPI knows whether to send the length is whether you provide something for one of those parameters, if you provide *OMIT for both, it will not send the length.

Providing an empty string such as '' will work the way you wish.

-SK

On 6/24/2020 6:46 PM, she lumbera wrote:
Hi Scott,

I am referring to this? Is it not the current version?

Initially, I have coded like this. Body is not required and I got the error length required.

RC      = http_req('POST'       
        : %trimr(DTAURL) + UOID 
        : *omit                 
        : RESP                  
        : *omit                 
        : *omit)              

Then I tried to modify like this and somehow it worked.

RC      = http_req('POST'       
        : %trimr(DTAURL) + UOID 
        : *omit                 
        : RESP                  
        : *omit                 
        : ' ')              


On Thursday, 25 June 2020, 12:02:14 am GMT+8, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:


HTTPAPI version 1.4?   Did you mean to say 1.40?   (1.4 is from 2002)

Assuming you really meant 1.40, can you please tell us how to reproduce the problem?


On 6/22/2020 3:14 AM, she lumbera wrote:
Hello guys,

Newbie here. I am doing a simple HTTP_REQ(POST). For the request, the body is not sent and I am hitting the error 411 Length Required. I am using HTTPAPI version 1.4. I saw in the archived that his bug has already been fixed. Can anyone please help what could be causing this error and how to fix it?Thanks in advance.
--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi


-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi