[#OSSL_HTTP_open]
= OSSL&lowbar;HTTP&lowbar;open
:mrdocs:

Open an HTTP (or HTTPS) connection and allocate a request context&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:OSSL_HTTP_REQ_CTX.adoc[OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX]*
OSSL&lowbar;HTTP&lowbar;open(
    char const* server,
    char const* port,
    char const* proxy,
    char const* no&lowbar;proxy,
    int use&lowbar;ssl,
    xref:BIO.adoc[BIO]* bio,
    xref:BIO.adoc[BIO]* rbio,
    xref:OSSL_HTTP_bio_cb_t.adoc[OSSL&lowbar;HTTP&lowbar;bio&lowbar;cb&lowbar;t] bio&lowbar;update&lowbar;fn,
    void* arg,
    int buf&lowbar;size,
    int overall&lowbar;timeout);
----

== Return Value

New OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX, or NULL on failure&semi; free with OSSL&lowbar;HTTP&lowbar;REQ&lowbar;CTX&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *server*
| Hostname or address of the HTTP server&period;
| *port*
| Port string, or NULL for the default (80&sol;443)&period;
| *proxy*
| Optional HTTP proxy host, or NULL&period;
| *no&lowbar;proxy*
| Optional comma&hyphen;separated bypass list, or NULL&period;
| *use&lowbar;ssl*
| Non&hyphen;zero to use TLS (HTTPS)&period;
| *bio*
| Optional pre&hyphen;existing write BIO, or NULL to create one&period;
| *rbio*
| Optional separate read BIO, or NULL to use `bio` for both&period;
| *bio&lowbar;update&lowbar;fn*
| Optional connect&sol;disconnect BIO callback, or NULL&period;
| *arg*
| User pointer passed to `bio&lowbar;update&lowbar;fn&period;`
| *buf&lowbar;size*
| I&sol;O buffer size hint (0 for default)&period;
| *overall&lowbar;timeout*
| Overall transfer timeout in seconds (0 for default&sol;none)&period;
|===


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