2

Does someone can explain how to download file from the server using Mbedtls library? They provide some example for using GET request from localhost. I have used it and modified to work with POST. This works just fine but it looks like when I send a GET request which supposes to bring back a file data as a stream I get back just a header without data.

I pretty much sure I am doing something wrong in my code. Do I need to set some specific configuration to download file ?

pretty stuck and need assist, any help will be more than appreciated.

PeterP
  • 21
  • 1

1 Answers1

0

Does it work with this library? It is built on top of nodejs/http-parser which should also handle chunked responses and other weird things you might encounter in the wild.

If that doesn't help, the URL to the resource you try to download would be appreciated :-).

Jan Jongboom
  • 26,598
  • 9
  • 83
  • 120
  • What i have explained in my post and maybe it was not clear is that i receive back data from the host. Unfortunately it is only a Header of the response message. Also mbedtls_ssl_read function reads only header and than when i try to get the file byte stream i get nothing from this function. More ever it waits inside until timeout occurs. This,mbedtls library, requires many configuration to be done in openning tls channel so i assume i have missed something. – PeterP Feb 17 '17 at 12:49
  • Could you check and see if it works using https://github.com/ARMmbed/mbed-os-example-tls/tree/master/tls-client ? If not, can you open an issue against that repo? – Jan Jongboom Feb 20 '17 at 12:19