How do I download a file using mbedTLS? I created a request that looks like this:
"GET /filename HTTP/1.1\r\n" \ "User-Agent: mbed-TLS-2.13.1\r\n" \ "Accept: */*\r\n" \ "Cache-Control: no-cache\r\n" \ "Host: project.hostname.com\r\n" \ "Accept-Encoding: gzip, deflate, br\r\n" \ "Connection: keep-alive\r\n\r\n"
What I got back was:
< Read from server: 555 bytes read
HTTP/1.1 200 OK
Last-Modified: Fri, 24 Jan 2020 18:36:32 GMT
Strict-Transport-Security: max-age=31556926; includeSubDomains; preload
Date: Tue, 11 Feb 2020 19:39:17 GMT
Vary: x-fh-requested-host, accept-encoding
My data buffer is 1 MB and I was expecting a file about 260 KB in size. It looks like I all I got was a header, no binary file. Using the Chrome web browser, I can get the file from
Chrome does ask where I want to put the file. Postman also works just fine with the GET request above and immediately returns the binary file. What am I missing?