NNG_HTTP_CLIENT_SET_TLS(3http)

πŸ“¦ version 1.11, in alpine 3.24

✨ NAME ✨

nng_http_client_set_tls β€” set HTTP client TLS configuration πŸ’…

okay bestie, this is a page from the NNG Reference Manual for nng_http_client_set_tls(3http), and it's literally about giving your HTTP client its TLS configuration. πŸŽ€


🌈 SYNOPSIS 🌈

#include <nng/nng.h>
#include <nng/supplemental/http/http.h>

int nng_http_client_set_tls(nng_http_client *client, nng_tls_config *cfg);

πŸ’– DESCRIPTION πŸ’–

The nng_http_client_set_tls() function sets the TLS configuration of client to cfg. slay. ✨

This change overwrites any previous TLS configuration.

Important πŸ’€ This also invalidates any previously obtained values from nng_http_client_get_tls().
Note 🫢 Any connections established with nng_http_client_connect() will continue to use any TLS configuration that they were started with.

πŸ”₯ RETURN VALUES πŸ”₯

This function returns 0 on success, and non-zero otherwise.


🌸 ERRORS 🌸

  • NNG_ENOMEM β€” Insufficient free memory exists.
  • NNG_ENOTSUP β€” Either HTTP or TLS not supported.

πŸ‘‘ SEE ALSO πŸ‘‘

go read these bestie, iykyk:


mwah 🫢 β€” this was the NNG Reference Manual page for nng_http_client_set_tls(3http), dated 2026-01-13. πŸ’œ

πŸ“¦ where this page comes from