Is there a good tutorial code for an httpS client using the mongoose library? #3022
-
Im looking for a HTTPS client tutorial to verify connection to a HTTPS server, I was using TCP |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
mongoose/tutorials/http/http-client/main.c Lines 18 to 57 in bf592a2 $ cd tutorials/http/http-client/
$ make clean example
rm -rf example *.o *.obj *.exe *.dSYM mbedtls ./pack
cc main.c mongoose.c packed_fs.c -W -Wall -Wextra -g -I. -DMG_ENABLE_LINES=1 -DMG_ENABLE_PACKED_FS=1 -DMG_TLS=MG_TLS_BUILTIN -o example
$ LOG_LEVEL=2 ./example https://www.cesanta.com/
5d9722 1 http.c:1076:http_cb Content length missing from response
5d9723 1 http.c:1076:http_cb Content length missing from response
5d9723 1 http.c:1076:http_cb Content length missing from response
HTTP/1.1 200 OK
Server: nginx/1.18.0
Date: Fri, 24 Jan 2025 13:45:32 GMT
Content-Type: text/html
Connection: close
<!DOCTYPE html>
[...]
</html>
$ |
Beta Was this translation helpful? Give feedback.
-
The fact that the example does not work for you, the way you try it, in those sites you want it to work, does not mean it only works for cesanta.com. LMGTFY
Let's see
Let's try MbedTLS
No, it is not a certificate problem, it is TLS version or cypher availability issue
mongoose/tutorials/http/http-client/Makefile Lines 38 to 40 in 8de9699
|
Beta Was this translation helpful? Give feedback.
#3020 (comment)
mongoose/tutorials/http/http-client/main.c
Lines 18 to 57 in bf592a2