[#OSSL_HTTP_REQ_CTX_set_expected]
= OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX&lowbar;set&lowbar;expected
:mrdocs:

Configure response Content&hyphen;Type, ASN&period;1, timeout, and keep&hyphen;alive expectations on `rctx&period;`

== Synopsis

Declared in `&lt;openssl&sol;http&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX&lowbar;set&lowbar;expected(
    xref:OSSL_HTTP_REQ_CTX.adoc[OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX]* rctx,
    char const* content&lowbar;type,
    int asn1,
    int timeout,
    int keep&lowbar;alive);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rctx*
| Request context&semi; call before OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX&lowbar;set1&lowbar;req() when `keep&lowbar;alive` is nonzero&period;
| *content&lowbar;type*
| Required response Content&hyphen;Type (exact or prefix before &apos;&semi;&apos;), or NULL to accept any&period;
| *asn1*
| Nonzero if the body must be ASN&period;1 DER (disables streaming&semi; use the memory BIO)&period;
| *timeout*
| Soft transfer timeout in seconds (&gt;0 limited&semi; 0 wait forever&semi; &lt;0 keep prior&sol;open default)&period;
| *keep&lowbar;alive*
| 0 close after response&semi; 1 request persistence&semi; 2 require persistence or fail&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
