[#OSSL_HTTP_REQ_CTX_set_request_line]
= OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX&lowbar;set&lowbar;request&lowbar;line
:mrdocs:

Set the first HTTP request line (method and request&hyphen;target) 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;request&lowbar;line(
    xref:OSSL_HTTP_REQ_CTX.adoc[OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX]* rctx,
    int method&lowbar;POST,
    char const* server,
    char const* port,
    char const* path);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rctx*
| Request context to update&period;
| *method&lowbar;POST*
| Nonzero for POST&semi; zero for GET&period;
| *server*
| Optional origin host an HTTP proxy should forward to, or NULL&period;
| *port*
| Optional origin port for proxy forwarding, or NULL&period;
| *path*
| Request path (NULL means &quot;&sol;&quot;)&semi; may be an absolute http&colon;&sol;&sol; URI for proxy use (then `server&sol;port` must be NULL)&period;
|===


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