[#OSSL_HTTP_set1_request] = OSSL_HTTP_set1_request :mrdocs: Configure the HTTP request path, headers, body, and response expectations on `rctx.` == Synopsis Declared in `<openssl/http.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int OSSL_HTTP_set1_request( xref:OSSL_HTTP_REQ_CTX.adoc[OSSL_HTTP_REQ_CTX]* rctx, char const* path, xref:stack_st_CONF_VALUE.adoc[stack_st_CONF_VALUE] const* headers, char const* content_type, xref:BIO.adoc[BIO]* req, char const* expected_content_type, int expect_asn1, size_t max_resp_len, int timeout, int keep_alive); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *rctx* | HTTP request context previously created with OSSL_HTTP_open() or OSSL_HTTP_REQ_CTX_new(). | *path* | Request‐URI path (or absolute http:// URI for a proxy); NULL defaults to "/". | *headers* | Optional additional request headers, or NULL. | *content_type* | Content‐Type for `req` when a body is present, or NULL. | *req* | Optional BIO holding the request body, or NULL for a GET‐style request without a body. | *expected_content_type* | Expected response Content‐Type, or NULL to accept any. | *expect_asn1* | Nonzero if the response body should be treated as ASN.1 DER. | *max_resp_len* | Maximum accepted response length in bytes. | *timeout* | Overall soft timeout in seconds for the exchange (<= 0 means none / keep previous). | *keep_alive* | Keep‐alive preference (0 off, 1 on, 2 prefer and fail if unavailable). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#