/usr/share/doc/racket/net/url.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>2 URLs and HTTP</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Net:<span class="mywbr"> </span> Networking Libraries</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="http-client.html" class="tocviewlink" data-pltdoc="x">HTTP Client</a></td></tr><tr><td align="right">2 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">URLs and HTTP</a></td></tr><tr><td align="right">3 </td><td><a href="uri-codec.html" class="tocviewlink" data-pltdoc="x">URI Codec:<span class="mywbr"> </span> Encoding and Decoding URIs</a></td></tr><tr><td align="right">4 </td><td><a href="websocket.html" class="tocviewlink" data-pltdoc="x">Web<span class="mywbr"> </span>Socket</a></td></tr><tr><td align="right">5 </td><td><a href="ftp.html" class="tocviewlink" data-pltdoc="x">FTP:<span class="mywbr"> </span> Client</a></td></tr><tr><td align="right">6 </td><td><a href="sendurl.html" class="tocviewlink" data-pltdoc="x">Send URL:<span class="mywbr"> </span> Opening a Web Browser</a></td></tr><tr><td align="right">7 </td><td><a href="smtp.html" class="tocviewlink" data-pltdoc="x">SMTP:<span class="mywbr"> </span> Sending E-<wbr></wbr>Mail</a></td></tr><tr><td align="right">8 </td><td><a href="sendmail.html" class="tocviewlink" data-pltdoc="x"><span class="stt">sendmail</span>:<span class="mywbr"> </span> Sending E-<wbr></wbr>Mail</a></td></tr><tr><td align="right">9 </td><td><a href="head.html" class="tocviewlink" data-pltdoc="x">Headers:<span class="mywbr"> </span> Parsing and Constructing</a></td></tr><tr><td align="right">10 </td><td><a href="imap.html" class="tocviewlink" data-pltdoc="x">IMAP:<span class="mywbr"> </span> Reading Mail</a></td></tr><tr><td align="right">11 </td><td><a href="pop3.html" class="tocviewlink" data-pltdoc="x">POP3:<span class="mywbr"> </span> Reading Mail</a></td></tr><tr><td align="right">12 </td><td><a href="mime.html" class="tocviewlink" data-pltdoc="x">MIME:<span class="mywbr"> </span> Decoding Internet Data</a></td></tr><tr><td align="right">13 </td><td><a href="base64.html" class="tocviewlink" data-pltdoc="x">Base 64:<span class="mywbr"> </span> Encoding and Decoding</a></td></tr><tr><td align="right">14 </td><td><a href="qp.html" class="tocviewlink" data-pltdoc="x">Quoted-<wbr></wbr>Printable:<span class="mywbr"> </span> Encoding and Decoding</a></td></tr><tr><td align="right">15 </td><td><a href="dns.html" class="tocviewlink" data-pltdoc="x">DNS:<span class="mywbr"> </span> Domain Name Service Queries</a></td></tr><tr><td align="right">16 </td><td><a href="nntp.html" class="tocviewlink" data-pltdoc="x">NNTP:<span class="mywbr"> </span> Newsgroup Protocol</a></td></tr><tr><td align="right">17 </td><td><a href="tcp.html" class="tocviewlink" data-pltdoc="x">TCP:<span class="mywbr"> </span> Unit and Signature</a></td></tr><tr><td align="right">18 </td><td><a href="tcp-redirect.html" class="tocviewlink" data-pltdoc="x">TCP Redirect:<span class="mywbr"> </span> <span class="RktSym"><span class="RktStxLink">tcp^</span></span> via Channels</a></td></tr><tr><td align="right">19 </td><td><a href="ssl-tcp-unit.html" class="tocviewlink" data-pltdoc="x">SSL Unit:<span class="mywbr"> </span> <span class="RktSym"><span class="RktStxLink">tcp^</span></span> via SSL</a></td></tr><tr><td align="right">20 </td><td><a href="cgi.html" class="tocviewlink" data-pltdoc="x">CGI Scripts</a></td></tr><tr><td align="right">21 </td><td><a href="cookie.html" class="tocviewlink" data-pltdoc="x">Cookie:<span class="mywbr"> </span> HTTP Client Storage</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>2 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">URLs and HTTP</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">2.1 </td><td><a href="#%28part._.U.R.L_.Structure%29" class="tocviewlink" data-pltdoc="x">URL Structure</a></td></tr><tr><td align="right">2.2 </td><td><a href="#%28part._.U.R.L_.Functions%29" class="tocviewlink" data-pltdoc="x">URL Functions</a></td></tr><tr><td align="right">2.3 </td><td><a href="#%28part._.U.R.L_.H.T.T.P.S_mode%29" class="tocviewlink" data-pltdoc="x">URL HTTPS mode</a></td></tr><tr><td align="right">2.4 </td><td><a href="#%28part._.U.R.L_.Unit%29" class="tocviewlink" data-pltdoc="x">URL Unit</a></td></tr><tr><td align="right">2.5 </td><td><a href="#%28part._.U.R.L_.Signature%29" class="tocviewlink" data-pltdoc="x">URL Signature</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">2.1<tt> </tt></span><a href="#%28part._.U.R.L_.Structure%29" class="tocsubseclink" data-pltdoc="x">URL Structure</a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">url</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._path%2Fparam%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">path/<span class="mywbr"> </span>param</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2.2<tt> </tt></span><a href="#%28part._.U.R.L_.Functions%29" class="tocsubseclink" data-pltdoc="x">URL Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._string-~3eurl%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">string-<wbr></wbr>>url</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._combine-url%2Frelative%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">combine-<wbr></wbr>url/<span class="mywbr"> </span>relative</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._netscape%2Fstring-~3eurl%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">netscape/<span class="mywbr"> </span>string-<wbr></wbr>>url</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-~3estring%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">url-<wbr></wbr>>string</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._path-~3eurl%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">path-<wbr></wbr>>url</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-~3epath%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">url-<wbr></wbr>>path</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._relative-path-~3erelative-url-string%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">relative-<wbr></wbr>path-<wbr></wbr>>relative-<wbr></wbr>url-<wbr></wbr>string</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._file-url-path-convention-type%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">file-<wbr></wbr>url-<wbr></wbr>path-<wbr></wbr>convention-<wbr></wbr>type</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._current-url-encode-mode%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>url-<wbr></wbr>encode-<wbr></wbr>mode</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">get-<wbr></wbr>pure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._head-pure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">head-<wbr></wbr>pure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._delete-pure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">delete-<wbr></wbr>pure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-impure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">get-<wbr></wbr>impure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._head-impure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">head-<wbr></wbr>impure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._delete-impure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">delete-<wbr></wbr>impure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._post-pure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">post-<wbr></wbr>pure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._put-pure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">put-<wbr></wbr>pure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._post-impure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">post-<wbr></wbr>impure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._put-impure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">put-<wbr></wbr>impure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._display-pure-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">display-<wbr></wbr>pure-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._purify-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">purify-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%2Fheaders%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">get-<wbr></wbr>pure-<wbr></wbr>port/<span class="mywbr"> </span>headers</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-connection~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">http-<wbr></wbr>connection?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._make-http-connection%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>http-<wbr></wbr>connection</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-connection-close%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">http-<wbr></wbr>connection-<wbr></wbr>close</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._call%2Finput-url%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">call/<span class="mywbr"> </span>input-<wbr></wbr>url</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._current-proxy-servers%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>proxy-<wbr></wbr>servers</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-exception~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">url-<wbr></wbr>exception?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-sendrecv%2Furl%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">http-<wbr></wbr>sendrecv/<span class="mywbr"> </span>url</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2.3<tt> </tt></span><a href="#%28part._.U.R.L_.H.T.T.P.S_mode%29" class="tocsubseclink" data-pltdoc="x">URL HTTPS mode</a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl-connect..rkt%29._current-https-protocol%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>https-<wbr></wbr>protocol</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2.4<tt> </tt></span><a href="#%28part._.U.R.L_.Unit%29" class="tocsubseclink" data-pltdoc="x">URL Unit</a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Furl-unit..rkt%29._url~40%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">url@</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2.5<tt> </tt></span><a href="#%28part._.U.R.L_.Signature%29" class="tocsubseclink" data-pltdoc="x">URL Signature</a></td></tr><tr><td><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url~5e%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">url^</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url%2Bscheme~5e%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">url+<span class="mywbr"> </span>scheme^</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="http-client.html" title="backward to "1 HTTP Client"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Net: Networking Libraries"" data-pltdoc="x">up</a> <a href="uri-codec.html" title="forward to "3 URI Codec: Encoding and Decoding URIs"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""url"">2<tt> </tt><a name="(part._url)"></a><a name="(mod-path._net/url)"></a>URLs and HTTP</h3><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url</span></a> library provides
utilities to parse and manipulate URIs, as specified in RFC 2396
[<a href="doc-bibliography.html#%28cite._.R.F.C2396%29" data-pltdoc="x">RFC2396</a>], and to use the HTTP protocol.</div></p><p>To access the text of a document from the web, first obtain its URL as
a string. Convert the address into a <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url%29%29" class="RktValLink" data-pltdoc="x">url</a></span> structure using
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._string-~3eurl%29%29" class="RktValLink" data-pltdoc="x">string->url</a></span>. Then, open the document using
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%29%29" class="RktValLink" data-pltdoc="x">get-pure-port</a></span> or <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-impure-port%29%29" class="RktValLink" data-pltdoc="x">get-impure-port</a></span>, depending on
whether or not you wish to examine its MIME headers. At this point,
you have a regular input port with which to process the document, as with
any other file.</p><p>Currently the only supported protocols are <span class="RktVal">"http"</span>,
<span class="RktVal">"https"</span>, and sometimes <span class="RktVal">"file"</span>.</p><p>The <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url</span></a> logs information and background-thread
errors to a logger named <span class="RktVal">'</span><span class="RktVal">net/url</span>.</p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""URL_Structure"">2.1<tt> </tt><a name="(part._.U.R.L_.Structure)"></a><a name="(mod-path._net/url-structs)"></a>URL Structure</h4><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._net%2Furl-structs%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url-structs</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The URL structure types are
provided by the <a href="#%28mod-path._net%2Furl-structs%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url-structs</span></a> library, and
re-exported by <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><span class="nobreak"><a name="(def._((lib._net/url-structs..rkt)._url-fragment))"></a><a name="(def._((lib._net/url-structs..rkt)._url-query))"></a><a name="(def._((lib._net/url-structs..rkt)._url-path))"></a><a name="(def._((lib._net/url-structs..rkt)._url-path-absolute~3f))"></a><a name="(def._((lib._net/url-structs..rkt)._url-port))"></a><a name="(def._((lib._net/url-structs..rkt)._url-host))"></a><a name="(def._((lib._net/url-structs..rkt)._url-user))"></a><a name="(def._((lib._net/url-structs..rkt)._url-scheme))"></a><a name="(def._((lib._net/url-structs..rkt)._make-url))"></a><a name="(def._((lib._net/url-structs..rkt)._url~3f))"></a><a name="(def._((lib._net/url-structs..rkt)._struct~3aurl))"></a><a name="(def._((lib._net/url-structs..rkt)._url))"></a><span title="Provided from: net/url-structs, net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url%29%29" class="RktValDef RktValLink" data-pltdoc="x">url</a></span></span></span></td><td><span class="hspace"> </span><span class="RktPn">(</span></td><td><span class="nobreak"><span class="RktSym">scheme</span></span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">user</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">host</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">port</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">path-absolute?</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">path</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">query</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktSym">fragment</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._make-url%29%29" class="RktValLink" data-pltdoc="x">make-url</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">scheme</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">user</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">host</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">port</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">path-absolute?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">path</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._path%2Fparam~3f%29%29" class="RktValLink" data-pltdoc="x">path/param?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">query</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._cons%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">fragment</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">The basic structure for all URLs, which is explained in RFC 3986
[<a href="doc-bibliography.html#%28cite._.R.F.C3986%29" data-pltdoc="x">RFC3986</a>]. The following diagram illustrates the parts:</div></p><p><table cellspacing="0" cellpadding="0"><tr><td><p><span class="hspace"> </span><span class="stt">http://sky@www:801/cgi-bin/finger;xyz?name=shriram;host=nw#top</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt">{-1}</span><span class="hspace"> </span><span class="stt">{2} {3} {4}{---5---------} {6} {----7-------------} {8}</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt">1 = scheme, 2 = user, 3 = host, 4 = port,</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt">5 = path (two elements),</span><span class="hspace"> </span><span class="stt">6 = param (of second path element),</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt">7 = query, 8 = fragment</span></p></td></tr></table></p><p>The strings inside the <span class="RktSym">user</span>, <span class="RktSym">path</span>, <span class="RktSym">query</span>,
and <span class="RktSym">fragment</span> fields are represented directly as Racket
strings, without URL-syntax-specific quoting. The procedures
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._string-~3eurl%29%29" class="RktValLink" data-pltdoc="x">string->url</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-~3estring%29%29" class="RktValLink" data-pltdoc="x">url->string</a></span> translate encodings such
as <span class="RktInBG"><span class="hspace"></span><span class="RktIn">%20</span><span class="hspace"></span></span> into spaces and back again.</p><p>By default, query associations are parsed with either <span class="RktInBG"><span class="hspace"></span><span class="RktIn">;</span><span class="hspace"></span></span> or
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">&</span><span class="hspace"></span></span> as a separator, and they are generated with <span class="RktInBG"><span class="hspace"></span><span class="RktIn">&</span><span class="hspace"></span></span> as
a separator. The <span class="RktSym"><a href="uri-codec.html#%28def._%28%28lib._net%2Furi-codec..rkt%29._current-alist-separator-mode%29%29" class="RktValLink" data-pltdoc="x">current-alist-separator-mode</a></span> parameter
adjusts the behavior.</p><p>An empty string at the end of the <span class="RktSym">path</span> list corresponds to a
URL that ends in a slash. For example, the result of
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._string-~3eurl%29%29" class="RktValLink" data-pltdoc="x">string->url</a></span><span class="stt"> </span><span class="RktVal">"http://racket-lang.org/a/"</span><span class="RktPn">)</span> has a
<span class="RktSym">path</span> field with strings <span class="RktVal">"a"</span> and <span class="RktVal">""</span>, while
the result of <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._string-~3eurl%29%29" class="RktValLink" data-pltdoc="x">string->url</a></span><span class="stt"> </span><span class="RktVal">"http://racket-lang.org/a"</span><span class="RktPn">)</span> has a
<span class="RktSym">path</span> field with only the string <span class="RktVal">"a"</span>.</p><p>When a <span class="RktVal">"file"</span> URL is represented by a <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url%29%29" class="RktValLink" data-pltdoc="x">url</a></span> structure,
the <span class="RktSym">path</span> field is mostly a list of path elements. For Unix
paths, the root directory is not included in <span class="RktSym">path</span>; its
presence or absence is implicit in the <span class="RktSym">path-absolute?</span> flag.
For Windows paths, the first element typically represents a drive, but
a UNC path is represented by a first element that is <span class="RktVal">""</span> and
then successive elements complete the drive components that are
separated by <span class="RktInBG"><span class="hspace"></span><span class="RktIn">/</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">\</span><span class="hspace"></span></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._net/url-structs..rkt)._path/param-param))"></a><a name="(def._((lib._net/url-structs..rkt)._path/param-path))"></a><a name="(def._((lib._net/url-structs..rkt)._make-path/param))"></a><a name="(def._((lib._net/url-structs..rkt)._path/param~3f))"></a><a name="(def._((lib._net/url-structs..rkt)._struct~3apath/param))"></a><a name="(def._((lib._net/url-structs..rkt)._path/param))"></a><span title="Provided from: net/url-structs, net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._path%2Fparam%29%29" class="RktValDef RktValLink" data-pltdoc="x">path/param</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">path</span><span class="stt"> </span><span class="RktSym">param</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._make-path%2Fparam%29%29" class="RktValLink" data-pltdoc="x">make-path/param</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">path</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">up</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">same</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">param</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A pair that joins a path segment with its params in a URL.</div></p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""URL_Functions"">2.2<tt> </tt><a name="(part._.U.R.L_.Functions)"></a>URL Functions</h4><p>An HTTP connection is created as a <a name="(tech._pure._port)"></a><span style="font-style: italic">pure port</span> or a
<a name="(tech._impure._port)"></a><span style="font-style: italic">impure port</span>. A pure port is one from which the MIME headers
have been removed, so that what remains is purely the first content
fragment. An impure port is one that still has its MIME headers.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._string-~3eurl))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._string-~3eurl%29%29" class="RktValDef RktValLink" data-pltdoc="x">string->url</a></span></span><span class="hspace"> </span><span class="RktVar">str</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">str</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._not%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">not/c</a></span><span class="hspace"> </span><span class="RktVal">#rx"^([^:/?#]*):"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">#rx"^[a-zA-Z][a-zA-Z0-9+.-]*:"</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Parses the URL specified by <span class="RktVar">str</span> into a <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url%29%29" class="RktValLink" data-pltdoc="x">url</a></span>
struct. The <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._string-~3eurl%29%29" class="RktValLink" data-pltdoc="x">string->url</a></span> procedure uses
<span class="RktSym"><a href="uri-codec.html#%28def._%28%28lib._net%2Furi-codec..rkt%29._form-urlencoded-~3ealist%29%29" class="RktValLink" data-pltdoc="x">form-urlencoded->alist</a></span> when parsing the query, so it is
sensitive to the <span class="RktSym"><a href="uri-codec.html#%28def._%28%28lib._net%2Furi-codec..rkt%29._current-alist-separator-mode%29%29" class="RktValLink" data-pltdoc="x">current-alist-separator-mode</a></span> parameter for
determining the association separator.</div></p><p>The contract on <span class="RktVar">str</span> insists that, if the url has a scheme,
then the scheme begins with a letter and consists only of letters,
numbers, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">+</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">-</span><span class="hspace"></span></span>, and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">.</span><span class="hspace"></span></span> characters.</p><p>If <span class="RktVar">str</span> starts with <span class="RktVal">"file:"</span>, then the path is always
parsed as an absolute path, and the parsing details depend on
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._file-url-path-convention-type%29%29" class="RktValLink" data-pltdoc="x">file-url-path-convention-type</a></span>:</p><ul><li><p><span class="RktVal">'</span><span class="RktVal">unix</span> : If <span class="RktVal">"file:"</span> is followed by
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">//</span><span class="hspace"></span></span> and a non-<span class="RktInBG"><span class="hspace"></span><span class="RktIn">/</span><span class="hspace"></span></span>, then the first element
after the <span class="RktInBG"><span class="hspace"></span><span class="RktIn">//</span><span class="hspace"></span></span> is parsed as a host (and maybe port);
otherwise, the first element starts the path, and the host is
<span class="RktVal">""</span>.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">windows</span> : If <span class="RktVal">"file:"</span> is followed by
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">//</span><span class="hspace"></span></span>, then the <span class="RktInBG"><span class="hspace"></span><span class="RktIn">//</span><span class="hspace"></span></span> is stripped; the remainder
parsed as a Windows path. The host is always <span class="RktVal">""</span> and
the port is always <span class="RktVal">#f</span>.</p></li></ul><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._combine-url/relative))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._combine-url%2Frelative%29%29" class="RktValDef RktValLink" data-pltdoc="x">combine-url/relative</a></span></span><span class="hspace"> </span><span class="RktVar">base</span><span class="hspace"> </span><span class="RktVar">relative</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">base</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">relative</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Given a base URL and a relative path, combines the two and returns a
new URL as per the URL combination specification. They are combined
according to the rules in RFC 3986 [<a href="doc-bibliography.html#%28cite._.R.F.C3986%29" data-pltdoc="x">RFC3986</a>].</div></p><p>This function does not raise any exceptions.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._netscape/string-~3eurl))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._netscape%2Fstring-~3eurl%29%29" class="RktValDef RktValLink" data-pltdoc="x">netscape/string->url</a></span></span><span class="hspace"> </span><span class="RktVar">str</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">str</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Turns a string into a URL, applying (what appear to be) Netscape’s
conventions on automatically specifying the scheme: a string starting
with a slash gets the scheme <span class="RktVal">"file"</span>, while all others get the
scheme <span class="RktVal">"http"</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._url-~3estring))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-~3estring%29%29" class="RktValDef RktValLink" data-pltdoc="x">url->string</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Generates a string corresponding to the contents of a <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url%29%29" class="RktValLink" data-pltdoc="x">url</a></span>
struct. For a <span class="RktVal">"file:"</span> URL, the URL must not be relative, the
result always starts <span class="RktInBG"><span class="hspace"></span><span class="RktIn">file://</span><span class="hspace"></span></span>, and the interpretation of the
path depends on the value of <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._file-url-path-convention-type%29%29" class="RktValLink" data-pltdoc="x">file-url-path-convention-type</a></span>:</div></p><ul><li><p><span class="RktVal">'</span><span class="RktVal">unix</span> : Elements in <span class="RktVar">URL</span> are treated as path
elements. Empty strings in the path list are treated like
<span class="RktVal">'</span><span class="RktVal">same</span>.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">windows</span> : If the first element is <span class="RktVal">""</span> then
the next two elements define the UNC root, and the rest of the
elements are treated as path elements. Empty strings in the
path list are treated like <span class="RktVal">'</span><span class="RktVal">same</span>.</p></li></ul><p>The <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-~3estring%29%29" class="RktValLink" data-pltdoc="x">url->string</a></span> procedure uses
<span class="RktSym"><a href="uri-codec.html#%28def._%28%28lib._net%2Furi-codec..rkt%29._alist-~3eform-urlencoded%29%29" class="RktValLink" data-pltdoc="x">alist->form-urlencoded</a></span> when formatting the query, so it is
sensitive to the <span class="RktSym"><a href="uri-codec.html#%28def._%28%28lib._net%2Furi-codec..rkt%29._current-alist-separator-mode%29%29" class="RktValLink" data-pltdoc="x">current-alist-separator-mode</a></span> parameter for
determining the association separator. The default is to separate
associations with a <span class="RktInBG"><span class="hspace"></span><span class="RktIn">&</span><span class="hspace"></span></span>.</p><p>The encoding of path segments and fragment is sensitive to the
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._current-url-encode-mode%29%29" class="RktValLink" data-pltdoc="x">current-url-encode-mode</a></span> parameter.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._path-~3eurl))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._path-~3eurl%29%29" class="RktValDef RktValLink" data-pltdoc="x">path->url</a></span></span><span class="hspace"> </span><span class="RktVar">path</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">path</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path-for-some-system%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">path-for-some-system?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Converts a path to a <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url%29%29" class="RktValLink" data-pltdoc="x">url</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._url-~3epath))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-~3epath%29%29" class="RktValDef RktValLink" data-pltdoc="x">url->path</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>[<span class="RktVar">kind</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path-for-some-system%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">path-for-some-system?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">kind</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">unix</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">windows</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._system-path-convention-type%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">system-path-convention-type</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Converts <span class="RktVar">URL</span>, which is assumed to be a <span class="RktVal">"file"</span> URL,
to a path.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._relative-path-~3erelative-url-string))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._relative-path-~3erelative-url-string%29%29" class="RktValDef RktValLink" data-pltdoc="x">relative-path->relative-url-string</a></span></span><span class="hspace"> </span><span class="RktVar">path</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">path</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._and%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path-for-some-system%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">path-for-some-system?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._relative-path%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">relative-path?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Converts <span class="RktVar">path</span> to a string that parses as a relative URL (with
forward slashes). Each element of <span class="RktVar">path</span> is an element of the
resulting URL path, and the string form of each element is encoded as
needed. If <span class="RktVar">path</span> is syntactically a directory, then the resulting
URL ends with <span class="RktInBG"><span class="hspace"></span><span class="RktIn">/</span><span class="hspace"></span></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._file-url-path-convention-type))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._file-url-path-convention-type%29%29" class="RktValDef RktValLink" data-pltdoc="x">file-url-path-convention-type</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">unix</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">windows</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._file-url-path-convention-type%29%29" class="RktValDef RktValLink" data-pltdoc="x">file-url-path-convention-type</a></span></span><span class="hspace"> </span><span class="RktVar">kind</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">kind</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">unix</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">windows</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Determines the default conversion to and from strings for
<span class="RktVal">"file"</span> URLs. See <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._string-~3eurl%29%29" class="RktValLink" data-pltdoc="x">string->url</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-~3estring%29%29" class="RktValLink" data-pltdoc="x">url->string</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._current-url-encode-mode))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._current-url-encode-mode%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-url-encode-mode</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">recommended</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">unreserved</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._current-url-encode-mode%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-url-encode-mode</a></span></span><span class="hspace"> </span><span class="RktVar">mode</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">mode</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">recommended</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">unreserved</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Determines how <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-~3estring%29%29" class="RktValLink" data-pltdoc="x">url->string</a></span> encodes <span class="RktInBG"><span class="hspace"></span><span class="RktIn">!</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">*</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">'</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">(</span><span class="hspace"></span></span>,
and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">)</span><span class="hspace"></span></span> in path segments and fragments:
<span class="RktVal">'</span><span class="RktVal">recommended</span> leave them as-is, while <span class="RktVal">'</span><span class="RktVal">unreserved</span>
encodes them using <span class="RktInBG"><span class="hspace"></span><span class="RktIn">%</span><span class="hspace"></span></span>. The <span class="RktVal">'</span><span class="RktVal">recommended</span> mode corresponds
to the recommendations of RFC 2396 [<a href="doc-bibliography.html#%28cite._.R.F.C2396%29" data-pltdoc="x">RFC2396</a>], but <span class="RktVal">'</span><span class="RktVal">unreserved</span>
avoids characters that are in some contexts mistaken for delimiters around
URLs.</div></p><p>Internally, <span class="RktVal">'</span><span class="RktVal">recommended</span> mode uses
<span class="RktSym"><a href="uri-codec.html#%28def._%28%28lib._net%2Furi-codec..rkt%29._uri-path-segment-encode%29%29" class="RktValLink" data-pltdoc="x">uri-path-segment-encode</a></span> and <span class="RktSym"><a href="uri-codec.html#%28def._%28%28lib._net%2Furi-codec..rkt%29._uri-encode%29%29" class="RktValLink" data-pltdoc="x">uri-encode</a></span>, while
<span class="RktVal">'</span><span class="RktVal">unreserved</span> mode uses
<span class="RktSym"><a href="uri-codec.html#%28def._%28%28lib._net%2Furi-codec..rkt%29._uri-path-segment-unreserved-encode%29%29" class="RktValLink" data-pltdoc="x">uri-path-segment-unreserved-encode</a></span> and
<span class="RktSym"><a href="uri-codec.html#%28def._%28%28lib._net%2Furi-codec..rkt%29._uri-unreserved-encode%29%29" class="RktValLink" data-pltdoc="x">uri-unreserved-encode</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._get-pure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">get-pure-port</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">URL</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktVar">header</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:redirections</span><span class="hspace"> </span><span class="RktVar">redirections</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">redirections</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">0</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._head-pure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._head-pure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">head-pure-port</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>[<span class="RktVar">header</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._delete-pure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._delete-pure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">delete-pure-port</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>[<span class="RktVar">header</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Initiates a GET/HEAD/DELETE request for <span class="RktVar">URL</span> and returns a
<a href="#%28tech._pure._port%29" class="techoutside" data-pltdoc="x"><span class="techinside">pure port</span></a> corresponding to the body of the response. The
optional list of strings can be used to send header lines to the
server.</div></p><p>The GET method is used to retrieve whatever information is identified
by <span class="RktVar">URL</span>. If <span class="RktVar">redirections</span> is not <span class="RktVal">0</span>, then
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%29%29" class="RktValLink" data-pltdoc="x">get-pure-port</a></span> will follow redirections from the server,
up to the limit given by <span class="RktVar">redirections</span>.</p><p>The HEAD method is identical to GET, except the server must not return
a message body. The meta-information returned in a response to a HEAD
request should be identical to the information in a response to a GET
request.</p><p>The DELETE method is used to delete the entity identified by
<span class="RktVar">URL</span>.</p><p><span style="font-weight: bold">Beware:</span> By default, <span class="RktVal">"https"</span> scheme handling does not
verify a server’s certificate (i.e., it’s equivalent of clicking
through a browser’s warnings), so communication is safe, but the
identity of the server is not verified. To validate the server’s
certificate, set <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-connect..rkt%29._current-https-protocol%29%29" class="RktValLink" data-pltdoc="x">current-https-protocol</a></span> to a context created
with <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=openssl&rel=index.html%23%2528def._%2528%2528lib._openssl%252Fmain..rkt%2529._ssl-make-client-context%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">ssl-make-client-context</a></span>, and enable certificate validation
in the context with <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=openssl&rel=index.html%23%2528def._%2528%2528lib._openssl%252Fmain..rkt%2529._ssl-set-verify%2521%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">ssl-set-verify!</a></span>.</p><p>The <span class="RktVal">"file"</span> scheme for URLs is handled only by
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%29%29" class="RktValLink" data-pltdoc="x">get-pure-port</a></span>, which uses <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=file-ports.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._open-input-file%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">open-input-file</a></span>, does not
handle exceptions, and ignores the optional strings.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._get-impure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-impure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">get-impure-port</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>[<span class="RktVar">header</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._head-impure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._head-impure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">head-impure-port</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>[<span class="RktVar">header</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._delete-impure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._delete-impure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">delete-impure-port</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>[<span class="RktVar">header</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%29%29" class="RktValLink" data-pltdoc="x">get-pure-port</a></span>, etc., but the resulting <a href="#%28tech._impure._port%29" class="techoutside" data-pltdoc="x"><span class="techinside">impure
port</span></a> contains both the returned headers and the body. The
<span class="RktVal">"file"</span> URL scheme is not handled by these functions.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._post-pure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._post-pure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">post-pure-port</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span><span class="RktVar">post</span><span class="hspace"> </span>[<span class="RktVar">header</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">post</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._put-pure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._put-pure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">put-pure-port</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span><span class="RktVar">post</span><span class="hspace"> </span>[<span class="RktVar">header</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">post</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Initiates a POST/PUT request for <span class="RktVar">URL</span> and sends the
<span class="RktVar">post</span> byte string. The result is a <a href="#%28tech._pure._port%29" class="techoutside" data-pltdoc="x"><span class="techinside">pure port</span></a>, which
contains the body of the response is returned. The optional list of
strings can be used to send header lines to the server.</div></p><p><span style="font-weight: bold">Beware:</span> See <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%29%29" class="RktValLink" data-pltdoc="x">get-pure-port</a></span> for warnings about
<span class="RktVal">"https"</span> certificate validation.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._post-impure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._post-impure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">post-impure-port</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span><span class="RktVar">post</span><span class="hspace"> </span>[<span class="RktVar">header</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">post</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._put-impure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._put-impure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">put-impure-port</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span><span class="RktVar">post</span><span class="hspace"> </span>[<span class="RktVar">header</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">post</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._post-pure-port%29%29" class="RktValLink" data-pltdoc="x">post-pure-port</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._put-pure-port%29%29" class="RktValLink" data-pltdoc="x">put-pure-port</a></span>, but the
resulting <a href="#%28tech._impure._port%29" class="techoutside" data-pltdoc="x"><span class="techinside">impure port</span></a> contains both the returned headers and
body.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._display-pure-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._display-pure-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">display-pure-port</a></span></span><span class="hspace"> </span><span class="RktVar">in</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Writes the output of a pure port, which is useful for debugging purposes.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._purify-port))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._purify-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">purify-port</a></span></span><span class="hspace"> </span><span class="RktVar">in</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">in</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Purifies a port, returning the MIME headers, plus a leading line for
the form <span class="RktInBG"><span class="hspace"></span><span class="RktIn">HTTP/</span><span class="hspace"></span></span><span class="sroman">‹<span style="font-style: italic">vers</span>›</span><span class="RktInBG"><span class="hspace"> </span></span><span class="sroman">‹<span style="font-style: italic">code</span>›</span><span class="RktInBG"><span class="hspace"> </span></span><span class="sroman">‹<span style="font-style: italic">message</span>›</span>, where <span class="sroman">‹<span style="font-style: italic">vers</span>›</span> is
something like <span class="RktInBG"><span class="hspace"></span><span class="RktIn">1.0</span><span class="hspace"></span></span> or <span class="RktInBG"><span class="hspace"></span><span class="RktIn">1.1</span><span class="hspace"></span></span>, <span class="sroman">‹<span style="font-style: italic">code</span>›</span> is an
exact integer for the response code, and <span class="sroman">‹<span style="font-style: italic">message</span>›</span> is
arbitrary text without a return or newline.</div></p><p>The <a href="head.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/head</span></a> library provides procedures, such as
<span class="RktSym"><a href="head.html#%28def._%28%28lib._net%2Fhead..rkt%29._extract-field%29%29" class="RktValLink" data-pltdoc="x">extract-field</a></span> for manipulating the header.</p><p>Since web servers sometimes return mis-formatted replies,
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._purify-port%29%29" class="RktValLink" data-pltdoc="x">purify-port</a></span> is liberal in what it accepts as a header. as a
result, the result string may be ill formed, but it will either be the
empty string, or it will be a string matching the following regexp:</p><blockquote class="SCodeFlow"><p><span class="RktVal">#rx"^HTTP/.*?(\r\n\r\n|\n\n|\r\r)"</span></p></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._get-pure-port/headers))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%2Fheaders%29%29" class="RktValDef RktValLink" data-pltdoc="x">get-pure-port/headers</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">url</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktVar">headers</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:redirections</span><span class="hspace"> </span><span class="RktVar">redirections</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:status?</span><span class="hspace"> </span><span class="RktVar">status?</span>]</td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:connection</span><span class="hspace"> </span><span class="RktVar">connection</span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">url</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">headers</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">redirections</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">status?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">connection</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-connection~3f%29%29" class="RktValLink" data-pltdoc="x">http-connection?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">This function is an alternative to calling <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-impure-port%29%29" class="RktValLink" data-pltdoc="x">get-impure-port</a></span> and
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._purify-port%29%29" class="RktValLink" data-pltdoc="x">purify-port</a></span> when needing to follow redirections. It also
supports HTTP/1.1 connections, which are used when the <span class="RktVar">connection</span>
argument is not <span class="RktVal">#f</span>.</div></p><p>The <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%2Fheaders%29%29" class="RktValLink" data-pltdoc="x">get-pure-port/headers</a></span> function performs a GET request
on <span class="RktVar">url</span>, follows up to <span class="RktVar">redirections</span> redirections
and returns a port containing the data as well as the headers for
the final connection. If <span class="RktVar">status?</span> is true, then the status
line is included in the result string.</p><p>A given <span class="RktVar">connection</span> should be used for communication
with a particular HTTP/1.1 server, unless <span class="RktVar">connection</span> is closed
(via <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-connection-close%29%29" class="RktValLink" data-pltdoc="x">http-connection-close</a></span>) between uses for different servers.
If <span class="RktVar">connection</span> is provided, read all data from the result port
before making a new request with the same <span class="RktVar">connection</span>. (Reusing
a <span class="RktVar">connection</span> without reading all data may or may not work.)</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._http-connection~3f))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-connection~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">http-connection?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._make-http-connection))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._make-http-connection%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-http-connection</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-connection~3f%29%29" class="RktValLink" data-pltdoc="x">http-connection?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._http-connection-close))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-connection-close%29%29" class="RktValDef RktValLink" data-pltdoc="x">http-connection-close</a></span></span><span class="hspace"> </span><span class="RktVar">connection</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">connection</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-connection~3f%29%29" class="RktValLink" data-pltdoc="x">http-connection?</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">A HTTP connection value represents a potentially persistent connection
with a HTTP/1.1 server for use with <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%2Fheaders%29%29" class="RktValLink" data-pltdoc="x">get-pure-port/headers</a></span>.</div></p><p>The <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._make-http-connection%29%29" class="RktValLink" data-pltdoc="x">make-http-connection</a></span> creates a “connection” that is
initially unconnected. Each call to <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%2Fheaders%29%29" class="RktValLink" data-pltdoc="x">get-pure-port/headers</a></span>
leaves a connection either connected or unconnected, depending on
whether the server allows the connection to continue. The
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-connection-close%29%29" class="RktValLink" data-pltdoc="x">http-connection-close</a></span> function unconnects, but it does not
prevent further use of the connection value.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._call/input-url))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._call%2Finput-url%29%29" class="RktValDef RktValLink" data-pltdoc="x">call/input-url</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span><span class="RktVar">connect</span><span class="hspace"> </span><span class="RktVar">handle</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">connect</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">handle</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._call%2Finput-url%29%29" class="RktValDef RktValLink" data-pltdoc="x">call/input-url</a></span></span><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span><span class="RktVar">connect</span><span class="hspace"> </span><span class="RktVar">handle</span><span class="hspace"> </span><span class="RktVar">header</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">URL</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">connect</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">handle</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Given a URL and a <span class="RktVar">connect</span> procedure like
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%29%29" class="RktValLink" data-pltdoc="x">get-pure-port</a></span> to convert the URL to an input port (either a
<a href="#%28tech._pure._port%29" class="techoutside" data-pltdoc="x"><span class="techinside">pure port</span></a> or <a href="#%28tech._impure._port%29" class="techoutside" data-pltdoc="x"><span class="techinside">impure port</span></a>), calls the <span class="RktVar">handle</span>
procedure on the port and closes the port on return. The result of the
<span class="RktVar">handle</span> procedure is the result of <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._call%2Finput-url%29%29" class="RktValLink" data-pltdoc="x">call/input-url</a></span>.</div></p><p>When a <span class="RktVar">header</span> argument is supplied, it is passed along to the
<span class="RktVar">connect</span> procedure.</p><p>The connection is made in such a way that the port is closed before
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._call%2Finput-url%29%29" class="RktValLink" data-pltdoc="x">call/input-url</a></span> returns, no matter how it returns. In
particular, it is closed if <span class="RktVar">handle</span> raises an exception, or if
the connection process is interruped by an asynchronous break
exception.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._current-proxy-servers))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._current-proxy-servers%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-proxy-servers</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._integer-in%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">65535</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._current-proxy-servers%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-proxy-servers</a></span></span><span class="hspace"> </span><span class="RktVar">mapping</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">mapping</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._integer-in%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">65535</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter that determines a mapping of proxy servers used for
connections. Each mapping is a list of three elements:</div></p><ul><li><p>the URL scheme, such as <span class="RktVal">"http"</span>;</p></li><li><p>the proxy server address; and</p></li><li><p>the proxy server port number.</p></li></ul><p>Currently, the only proxiable scheme is <span class="RktVal">"http"</span>. The default
mapping is the empty list (i.e., no proxies).</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._url-exception~3f))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._url-exception~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">url-exception?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Identifies an error thrown by URL functions.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._net/url..rkt)._http-sendrecv/url))"></a><span title="Provided from: net/url | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._http-sendrecv%2Furl%29%29" class="RktValDef RktValLink" data-pltdoc="x">http-sendrecv/url</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">u</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:method</span><span class="hspace"> </span><span class="RktVar">method</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:headers</span><span class="hspace"> </span><span class="RktVar">headers</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:data</span><span class="hspace"> </span><span class="RktVar">data</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:content-decode</span><span class="hspace"> </span><span class="RktVar">decodes</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">u</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-structs..rkt%29._url~3f%29%29" class="RktValLink" data-pltdoc="x">url?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">method</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#"GET"</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">headers</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Flist..rkt%2529._empty%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">empty</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">data</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">decodes</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">gzip</span><span class="RktVal">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Calls <span class="RktSym"><a href="http-client.html#%28def._%28%28lib._net%2Fhttp-client..rkt%29._http-sendrecv%29%29" class="RktValLink" data-pltdoc="x">http-sendrecv</a></span> using <span class="RktVar">u</span> to populate the host, URI, port, and SSL parameters.</div></p><p>This function does not support proxies.</p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""URL_HTTPS_mode"">2.3<tt> </tt><a name="(part._.U.R.L_.H.T.T.P.S_mode)"></a><a name="(mod-path._net/url-connect)"></a>URL HTTPS mode</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._net%2Furl-connect%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url-connect</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></p><p>These bindings are provided by the <a href="#%28mod-path._net%2Furl-connect%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url-connect</span></a> library, and
used by <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url</span></a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/url-connect..rkt)._current-https-protocol))"></a><span title="Provided from: net/url-connect | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-connect..rkt%29._current-https-protocol%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-https-protocol</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=openssl&rel=index.html%23%2528def._%2528%2528lib._openssl%252Fmain..rkt%2529._ssl-client-context%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: net/url-connect | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-connect..rkt%29._current-https-protocol%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-https-protocol</a></span></span><span class="hspace"> </span><span class="RktVar">protocol</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">protocol</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=openssl&rel=index.html%23%2528def._%2528%2528lib._openssl%252Fmain..rkt%2529._ssl-client-context%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">ssl-client-context?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter that determines the connection mode for <span class="RktVal">"https"</span>
connections; the parameter value is passed as the third argument to
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=openssl&rel=index.html%23%2528def._%2528%2528lib._openssl%252Fmain..rkt%2529._ssl-connect%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">ssl-connect</a></span> when creating an <span class="RktVal">"https"</span> connection.
Set this parameter to validate a server’s certificates, for example,
as described with <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._get-pure-port%29%29" class="RktValLink" data-pltdoc="x">get-pure-port</a></span>.</div></p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""URL_Unit"">2.4<tt> </tt><a name="(part._.U.R.L_.Unit)"></a><a name="(mod-path._net/url-unit)"></a>URL Unit</h4><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-unit..rkt%29._url~40%29%29" class="RktValLink" data-pltdoc="x">url@</a></span>, <span class="RktSym"><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url~5e%29%29" class="RktStxLink" data-pltdoc="x">url^</a></span>, and <span class="RktSym"><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url%2Bscheme~5e%29%29" class="RktStxLink" data-pltdoc="x">url+scheme^</a></span> are deprecated.
They exist for backward-compatibility and will likely be removed in
the future. New code should use the <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url</span></a> module.</p></blockquote></blockquote></blockquote><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._net%2Furl-unit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url-unit</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">compatibility-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._net/url-unit..rkt)._url~40))"></a><span title="Provided from: net/url-unit | Package: compatibility-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-unit..rkt%29._url~40%29%29" class="RktValDef RktValLink" data-pltdoc="x">url@</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">unit?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Imports <span class="RktSym"><a href="tcp.html#%28form._%28%28lib._net%2Ftcp-sig..rkt%29._tcp~5e%29%29" class="RktStxLink" data-pltdoc="x">tcp^</a></span>, exports <span class="RktSym"><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url%2Bscheme~5e%29%29" class="RktStxLink" data-pltdoc="x">url+scheme^</a></span>.</div></p><p>The <span class="RktSym"><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url%2Bscheme~5e%29%29" class="RktStxLink" data-pltdoc="x">url+scheme^</a></span> signature contains
<span class="RktSym">current-connect-scheme</span>, which <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-unit..rkt%29._url~40%29%29" class="RktValLink" data-pltdoc="x">url@</a></span> binds to a
parameter. The parameter is set to the scheme of a URL when
<span class="RktSym">tcp-connect</span> is called to create a connection. A
<span class="RktSym">tcp-connect</span> variant linked to <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-unit..rkt%29._url~40%29%29" class="RktValLink" data-pltdoc="x">url@</a></span> can check this
parameter to choose the connection mode; in particular, <span class="RktSym">net/url</span>
supplies a <span class="RktSym">tcp-connect</span> that actually uses <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=openssl&rel=index.html%23%2528def._%2528%2528lib._openssl%252Fmain..rkt%2529._ssl-connect%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">ssl-connect</a></span>
when <span class="RktPn">(</span><span class="RktSym">current-connect-scheme</span><span class="RktPn">)</span> produces <span class="RktVal">"https"</span>.</p><p>Note that <span class="RktSym">net/url</span> does not provide the
<span class="RktSym">current-connect-scheme</span> parameter.</p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-part-tag=""URL_Signature"">2.5<tt> </tt><a name="(part._.U.R.L_.Signature)"></a><a name="(mod-path._net/url-sig)"></a>URL Signature</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._net%2Furl-sig%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url-sig</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">compatibility-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>signature</p></div></div><p class="RForeground"><a name="(form._((lib._net/url-sig..rkt)._url~5e))"></a><span title="Provided from: net/url-sig | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url~5e%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">url^</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span>signature</p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="leftindent"><p>Includes everything exported by the <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url</span></a> module
except <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl-connect..rkt%29._current-https-protocol%29%29" class="RktValLink" data-pltdoc="x">current-https-protocol</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._net%2Furl..rkt%29._current-url-encode-mode%29%29" class="RktValLink" data-pltdoc="x">current-url-encode-mode</a></span>.
Note that the exports of
<a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/url</span></a> and the <span class="RktSym"><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url~5e%29%29" class="RktStxLink" data-pltdoc="x">url^</a></span> signature do not include
<span class="RktSym">current-connect-scheme</span>.</p></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>signature</p></div></div><p class="RForeground"><a name="(form._((lib._net/url-sig..rkt)._url+scheme~5e))"></a><span title="Provided from: net/url-sig | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url%2Bscheme~5e%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">url+scheme^</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span>signature</p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="leftindent"><p>Adds <span class="RktSym">current-connect-scheme</span> to <span class="RktSym"><a href="#%28form._%28%28lib._net%2Furl-sig..rkt%29._url~5e%29%29" class="RktStxLink" data-pltdoc="x">url^</a></span>.</p></blockquote></div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="http-client.html" title="backward to "1 HTTP Client"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Net: Networking Libraries"" data-pltdoc="x">up</a> <a href="uri-codec.html" title="forward to "3 URI Codec: Encoding and Decoding URIs"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|