Open an HTTP (or HTTPS) connection and allocate a request context.
Declared in <openssl/http.h>
OSSL_HTTP_REQ_CTX*
OSSL_HTTP_open(
char const* server,
char const* port,
char const* proxy,
char const* no_proxy,
int use_ssl,
BIO* bio,
BIO* rbio,
OSSL_HTTP_bio_cb_t bio_update_fn,
void* arg,
int buf_size,
int overall_timeout);
New OSSL_HTTP_REQ_CTX, or NULL on failure; free with OSSL_HTTP_REQ_CTX_free().
| Name | Description |
|---|---|
| server | Hostname or address of the HTTP server. |
| port | Port string, or NULL for the default (80/443). |
| proxy | Optional HTTP proxy host, or NULL. |
| no_proxy | Optional comma-separated bypass list, or NULL. |
| use_ssl | Non-zero to use TLS (HTTPS). |
| bio | Optional pre-existing write BIO, or NULL to create one. |
| rbio | Optional separate read BIO, or NULL to use bio for both. |
| bio_update_fn | Optional connect/disconnect BIO callback, or NULL. |
| arg | User pointer passed to bio_update_fn. |
| buf_size | I/O buffer size hint (0 for default). |
| overall_timeout | Overall transfer timeout in seconds (0 for default/none). |