![]() |
TIdHTTP Put Method - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Indy (https://www.atozed.com/forums/forum-8.html) +--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html) +--- Thread: TIdHTTP Put Method (/thread-614.html) |
TIdHTTP Put Method - jjeffman - 08-27-2018 Hello, I am using Indy 10 version 10.6.2.0 on C++ Builder 6.0 Professional Edition ( Windows10 ). I need to use the Put method of TIdHTTP, but it is sending headers before the stream of requests. Code: PUT ************* HTTP/1.1 How can I avoid those headers or at least put the headers I need before automatic headers ? Thank you very much. RE: TIdHTTP Put Method - rlebeau - 08-27-2018 (08-27-2018, 03:39 PM)jjeffman Wrote: I need to use the Put method of TIdHTTP, but it is sending headers before the stream of requests. As it should be, because that is how HTTP works. (08-27-2018, 03:39 PM)jjeffman Wrote: You cannot put a stream of data before request headers. What are you REALLY trying to accomplish? What is in your stream exactly? What is the server expecting the PUT request to look like exactly? Are you, by chance, trying to send a chunked request (with a Transfer-Encoding: chunked request header), where the request contains trailing headers after the chunk data is finished? If so, TIdHTTP does not currently support sending a chunked request at this time (only reading chunked responses). RE: TIdHTTP Put Method - jjeffman - 08-28-2018 Hi Remmy, I have solved this problem using a post of yours in another forum, where your answer to the question that was made there was to use CustomHeaders and an empty stream. I am using "CustomHeaders" to put the headers I need and adding the JSON data in the Stream, so now all is working fine. Thank you very much. |