[#OSSL_HTTP_REQ_CTX_set1_req]
= OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX&lowbar;set1&lowbar;req
:mrdocs:

Finalize the request by attaching an ASN&period;1 DER body and Content&hyphen;Type&sol;Length headers&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;set1&lowbar;req(
    xref:OSSL_HTTP_REQ_CTX.adoc[OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX]* rctx,
    char const* content&lowbar;type,
    xref:ASN1_ITEM.adoc[ASN1&lowbar;ITEM] const* it,
    xref:ASN1_VALUE.adoc[ASN1&lowbar;VALUE] const* req);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rctx*
| Request context prepared with OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX&lowbar;set&lowbar;request&lowbar;line() (and keep&hyphen;alive expectations if needed)&period;
| *content&lowbar;type*
| Content&hyphen;Type header value&semi; must be NULL when `req` is NULL&period;
| *it*
| ASN&period;1 item template used to encode `req` (DER&semi; not streaming)&period;
| *req*
| ASN&period;1 value to send as the body, or NULL for a body&hyphen;less (for example GET) request when keep&hyphen;alive still needs finalization&period;
|===


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