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

RE: HTTP PUT (without Body)



Without digging into http_persist_req it sounds like it is expecting some data where you passed *null. Try using a data location with length zero. Or because the server sounds like it will throw away any data, send it a space.


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Nilemind
Sent: Wednesday, December 9, 2015 11:55 AM
To: HTTPAPI and FTPAPI Projects
Subject: HTTP PUT (without Body)

Hi,

I have upgraded the version of LIBHTTP to use PUT protocol. However the requirement is to call PUT API without any body or data. In otherwords I am just calling the url without any content using PUT. As per Http_persist_req it looks for data pointer and length where I am passing null and 0.
Similarly they dont return any json back from this put and hence passing null in that response too. However Making all these above it is not working as expected. Either I get length needed as error message or '-1' as result of http_persist_req. Could you please guide me here. Thanks in advance.

 rc = http_persist_req( 'PUT'
                     : Pointer
                     : urlS
                     : 0
                     : *Null
                     : *Null
                     : 0
                     : 0
                     : *Null
                     : 300
                     : *omit
                     : 'application/json');


Error is thrown at HTTPAPIR4

eval      rc = saveproc( peFD
                       : %addr(wwData)
                       : wwLen )

with msg - Pointer not set for location referenced.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------