OSSL_HTTP_open

Open an HTTP (or HTTPS) connection and allocate a request context.

Synopsis

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);

Return Value

New OSSL_HTTP_REQ_CTX, or NULL on failure; free with OSSL_HTTP_REQ_CTX_free().

Parameters

NameDescription
serverHostname or address of the HTTP server.
portPort string, or NULL for the default (80/443).
proxyOptional HTTP proxy host, or NULL.
no_proxyOptional comma-separated bypass list, or NULL.
use_sslNon-zero to use TLS (HTTPS).
bioOptional pre-existing write BIO, or NULL to create one.
rbioOptional separate read BIO, or NULL to use bio for both.
bio_update_fnOptional connect/disconnect BIO callback, or NULL.
argUser pointer passed to bio_update_fn.
buf_sizeI/O buffer size hint (0 for default).
overall_timeoutOverall transfer timeout in seconds (0 for default/none).