
On Fri, Jan 31, 2025 at 07:03:41PM -0500, William Park via talk wrote:
Yes, it can be anything because HTTP has 3 parts really... first line, headers, and body. But, I'm tired of doing it again and again. Also, multiple parts and multiple encoding methods are hassle to keep track.
Well certainly with curl you can dump the headers to a file and the content to another file and could then use the content-type line in the header to determine what type the content is. I don't recall multipart being used for received data only for uploads, but maybe that is just because I haven't looked hard enough. A quick search seems to indicate that the received data is always just one file. Of course if you do persistent connections you get to do multiple requests and multiple receives (each with their own header) on the same socket, but that doesn't really change anything. -- Len Sorensen