OSSL_HTTP_REQ_CTX_add1_header

Append an HTTP request header name/value pair to an HTTP request context.

Synopsis

Declared in <openssl/http.h>

int
OSSL_HTTP_REQ_CTX_add1_header(
    OSSL_HTTP_REQ_CTX* rctx,
    char const* name,
    char const* value);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
rctxRequest context previously created with OSSL_HTTP_REQ_CTX_new().
nameHeader field name (for example "Content-Type").
valueHeader field value, or NULL to send a header with an empty value.