Pargat, HTTPAPI needs to know whether whether to send a request body or not. The way it determines this is by whether you pass *NULL for the data or not. If you pass *NULL, it will not send a request body. If you want it to send a request body, but you want the length of that request body to be 0, then you should pass a non-null value for the data, but pass the length=0. This will do what you want. You may be thinking "it should just know I want a request body because I'm doing a POST (or PUT?) request". But, I don't want to hard-code a list of methods that do/don't send request bodies because I want things to be generic. People are frequently adding new methods to the HTTP protocol for special/specific purposes, and I don't want to hard-code them all into HTTPAPI. Instead, I want you to be able to specify any method, and control for yourself whether it does or doesn't have a request body. That way, when new methods are released, they'll work without any changes to HTTPAPI. So -- it's very simple. Pass a non-null value for the post/put data, and pass length=0, and it will do what you want. -SK On 5/30/17 2:11 PM, Pargat Singh wrote:
|
-- _______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi