OSSL_HTTP_REQ_CTX_set1_req

Finalize the request by attaching an ASN.1 DER body and Content-Type/Length headers.

Synopsis

Declared in <openssl/http.h>

int
OSSL_HTTP_REQ_CTX_set1_req(
    OSSL_HTTP_REQ_CTX* rctx,
    char const* content_type,
    ASN1_ITEM const* it,
    ASN1_VALUE const* req);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
rctxRequest context prepared with OSSL_HTTP_REQ_CTX_set_request_line() (and keep-alive expectations if needed).
content_typeContent-Type header value; must be NULL when req is NULL.
itASN.1 item template used to encode req (DER; not streaming).
reqASN.1 value to send as the body, or NULL for a body-less (for example GET) request when keep-alive still needs finalization.