OSSL_HTTP_REQ_CTX_set_expected

Configure response Content-Type, ASN.1, timeout, and keep-alive expectations on rctx.

Synopsis

Declared in <openssl/http.h>

int
OSSL_HTTP_REQ_CTX_set_expected(
    OSSL_HTTP_REQ_CTX* rctx,
    char const* content_type,
    int asn1,
    int timeout,
    int keep_alive);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
rctxRequest context; call before OSSL_HTTP_REQ_CTX_set1_req() when keep_alive is nonzero.
content_typeRequired response Content-Type (exact or prefix before ';'), or NULL to accept any.
asn1Nonzero if the body must be ASN.1 DER (disables streaming; use the memory BIO).
timeoutSoft transfer timeout in seconds (>0 limited; 0 wait forever; <0 keep prior/open default).
keep_alive0 close after response; 1 request persistence; 2 require persistence or fail.