简体   繁体   中英

how to send file to http server through http request

i have to write c program for client such that it send xml file to server via http.i google up but can't understand .i have made socket program which send data from client to server but now we have to send file through http request. i have to send file text/xml from client to .net based server through http request.

It is unclear from your question that whether you want to post the XML data or you want to send the XML file as an attachment to the server (An opportunity to raise a "File Download" dialogue box for a known MIME type with binary format or suggest a filename for dynamic content. Quotes are necessary with special characters).

If you need to post the XML content to the Server simply read the XML file from your code apply http header over it & send it to the server.

If you need to send XML file as a downloadable content read MIME & HTTP headers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM