[#OSSL_parse_url]
= OSSL&lowbar;parse&lowbar;url
:mrdocs:

Parse `url` into allocated scheme&sol;user&sol;host&sol;port&sol;path&sol;query&sol;fragment components&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OSSL&lowbar;parse&lowbar;url(
    char const* url,
    char** pscheme,
    char** puser,
    char** phost,
    char** pport,
    int* pport&lowbar;num,
    char** ppath,
    char** pquery,
    char** pfrag);
----

== Return Value

1 on success, or 0 on failure&semi; free each returned string with OPENSSL&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *url*
| URL string to parse&period;
| *pscheme*
| Receives allocated scheme (for example &quot;https&quot;), or NULL to skip&period;
| *puser*
| Receives allocated userinfo, or NULL to skip&period;
| *phost*
| Receives allocated host, or NULL to skip&period;
| *pport*
| Receives allocated port string, or NULL to skip&period;
| *pport&lowbar;num*
| Receives numeric port, or NULL to skip&period;
| *ppath*
| Receives allocated path (at least &quot;&sol;&quot;), or NULL to skip&period;
| *pquery*
| Receives allocated query without leading &apos;?&apos;, or NULL to skip&period;
| *pfrag*
| Receives allocated fragment without leading &apos;&num;&apos;, or NULL to skip&period;
|===


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