This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129ENCPDT: Multipart/form data ppost request using httpcli library

Part Number: TM4C129ENCPDT

Hi all,

I am using HTTPCli library for https client req for wifi as well as ethernet. Right now, I am able to do simple get/post/put/delete req but I am trying to implement multipart post req method using httlpcli library.

There is a mechanism for file sending directly without reading the data of file into buffer. Some libraries provide this feature but I am not sure if this is available in this library.

Can anyone let me know a way to use multipart post req to send big files to https server using this library?

Thanks

akhi

  • Hi Akhi,

      I'm sorry that I'm really not an expert on the http multipart/form post request. I did some research myself to understand what is multipart post request. I don't think the HTTPCli library has the API to ease the creation of multipart post requests. I think you might need to use the HTTPCli_sendField() to setup the context-type for multipart. 

    I wonder if something like below will work. 

    char *CONTENT_TYPE = "multipart/form-data";  // you might need to insert some unique text string as the boundary between different parts. 

    ret = HTTPCli_sendField(&cli, HTTPStd_FIELD_NAME_CONTENT_TYPE, CONTENT_TYPE, false);