1<!DOCTYPE html> 2<html lang="en"> 3<head> 4<meta charset="UTF-8"> 5<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body> 6<script type="text/javascript">/* <![CDATA[ */ 7function get_sym_list(){return [];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class="c">' The MIT License (MIT)</span> 8<a class="l" name="2" href="#2">2</a><span class="c">'</span> 9<a class="l" name="3" href="#3">3</a><span class="c">' Copyright (c) 2016 Tim Hall</span> 10<a class="l" name="4" href="#4">4</a><span class="c">'</span> 11<a class="l" name="5" href="#5">5</a><span class="c">' Permission is hereby granted, free of charge, to any person obtaining a copy</span> 12<a class="l" name="6" href="#6">6</a><span class="c">' of this software and associated documentation files (the "Software"), to deal</span> 13<a class="l" name="7" href="#7">7</a><span class="c">' in the Software without restriction, including without limitation the rights</span> 14<a class="l" name="8" href="#8">8</a><span class="c">' to use, copy, modify, merge, publish, distribute, sublicense, <a href="/source/s?path=and/">and</a>/<a href="/source/s?path=and/or">or</a> sell</span> 15<a class="l" name="9" href="#9">9</a><span class="c">' copies of the Software, and to permit persons to whom the Software is</span> 16<a class="hl" name="10" href="#10">10</a><span class="c">' furnished to do so, subject to the following conditions:</span> 17<a class="l" name="11" href="#11">11</a><span class="c">'</span> 18<a class="l" name="12" href="#12">12</a><span class="c">' The above copyright notice and this permission notice shall be included in all</span> 19<a class="l" name="13" href="#13">13</a><span class="c">' copies or substantial portions of the Software.</span> 20<a class="l" name="14" href="#14">14</a><span class="c">'</span> 21<a class="l" name="15" href="#15">15</a><span class="c">' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span> 22<a class="l" name="16" href="#16">16</a><span class="c">' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span> 23<a class="l" name="17" href="#17">17</a><span class="c">' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span> 24<a class="l" name="18" href="#18">18</a><span class="c">' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span> 25<a class="l" name="19" href="#19">19</a><span class="c">' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span> 26<a class="hl" name="20" href="#20">20</a><span class="c">' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span> 27<a class="l" name="21" href="#21">21</a><span class="c">' SOFTWARE.</span> 28<a class="l" name="22" href="#22">22</a> 29<a class="l" name="23" href="#23">23</a><a href="/source/s?defs=VERSION" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VERSION</a> <span class="n">1.0</span> <b>CLASS</b> 30<a class="l" name="24" href="#24">24</a><a href="/source/s?defs=BEGIN" class="intelliWindow-symbol" data-definition-place="undefined-in-file">BEGIN</a> 31<a class="l" name="25" href="#25">25</a> <a href="/source/s?defs=MultiUse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">MultiUse</a> = <span class="n">-1</span> <span class="c">'True</span> 32<a class="l" name="26" href="#26">26</a><b>END</b> 33<a class="l" name="27" href="#27">27</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_Name" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_Name</a> = <span class="s">"WebResponse"</span> 34<a class="l" name="28" href="#28">28</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_GlobalNameSpace" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_GlobalNameSpace</a> = <b>False</b> 35<a class="l" name="29" href="#29">29</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_Creatable" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_Creatable</a> = <b>False</b> 36<a class="hl" name="30" href="#30">30</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_PredeclaredId" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_PredeclaredId</a> = <b>False</b> 37<a class="l" name="31" href="#31">31</a><a href="/source/s?defs=Attribute" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Attribute</a> <a href="/source/s?defs=VB_Exposed" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VB_Exposed</a> = <b>True</b> 38<a class="l" name="32" href="#32">32</a><span class="c">''</span> 39<a class="l" name="33" href="#33">33</a><span class="c">' WebResponse v4.1.3</span> 40<a class="l" name="34" href="#34">34</a><span class="c">' (c) Tim Hall - <a href="https://github.com/VBA-tools/VBA-Web">https://github.com/VBA-tools/VBA-Web</a></span> 41<a class="l" name="35" href="#35">35</a><span class="c">'</span> 42<a class="l" name="36" href="#36">36</a><span class="c">' Wrapper for <a href="/source/s?path=http/">http</a>/<a href="/source/s?path=http/cURL">cURL</a> responses that includes parsed Data based on WebRequest.ResponseFormat.</span> 43<a class="l" name="37" href="#37">37</a><span class="c">'</span> 44<a class="l" name="38" href="#38">38</a><span class="c">' Usage:</span> 45<a class="l" name="39" href="#39">39</a><span class="c">' ```VB.net</span> 46<a class="hl" name="40" href="#40">40</a><span class="c">' Dim Response As WebResponse</span> 47<a class="l" name="41" href="#41">41</a><span class="c">' Set Response = Client.Execute(Request)</span> 48<a class="l" name="42" href="#42">42</a><span class="c">'</span> 49<a class="l" name="43" href="#43">43</a><span class="c">' If Response.StatusCode = WebStatusCode.Ok Then</span> 50<a class="l" name="44" href="#44">44</a><span class="c">' ' Response.Headers, Response.Cookies</span> 51<a class="l" name="45" href="#45">45</a><span class="c">' ' Response.Data -> Parsed Response.Content based on Request.ResponseFormat</span> 52<a class="l" name="46" href="#46">46</a><span class="c">' ' Response.Body -> Raw response bytes</span> 53<a class="l" name="47" href="#47">47</a><span class="c">' Else</span> 54<a class="l" name="48" href="#48">48</a><span class="c">' Debug.Print "Error: " & Response.StatusCode & " - " & Response.Content</span> 55<a class="l" name="49" href="#49">49</a><span class="c">' End If</span> 56<a class="hl" name="50" href="#50">50</a><span class="c">' ```</span> 57<a class="l" name="51" href="#51">51</a><span class="c">'</span> 58<a class="l" name="52" href="#52">52</a><span class="c">' Errors:</span> 59<a class="l" name="53" href="#53">53</a><span class="c">' 11030 / 80042b16 / -2147210474 - Error creating from http</span> 60<a class="l" name="54" href="#54">54</a><span class="c">' 11031 / 80042b17 / -2147210473 - Error creating from cURL</span> 61<a class="l" name="55" href="#55">55</a><span class="c">' 11032 / 80042b18 / -2147210472 - Error extracting headers</span> 62<a class="l" name="56" href="#56">56</a><span class="c">'</span> 63<a class="l" name="57" href="#57">57</a><span class="c">' @class WebResponse</span> 64<a class="l" name="58" href="#58">58</a><span class="c">' @author tim.hall.engr@gmail.com</span> 65<a class="l" name="59" href="#59">59</a><span class="c">' @license MIT (<a href="http://www.opensource.org/licenses/mit-license.php)">http://www.opensource.org/licenses/mit-license.php)</a></span> 66<a class="hl" name="60" href="#60">60</a><span class="c">'' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '</span> 67<a class="l" name="61" href="#61">61</a><b>Option</b> <a href="/source/s?defs=Explicit" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Explicit</a> 68<a class="l" name="62" href="#62">62</a> 69<a class="l" name="63" href="#63">63</a><b>Private</b> <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a> <b>As</b> <b>String</b> 70<a class="l" name="64" href="#64">64</a> 71<a class="l" name="65" href="#65">65</a><span class="c">' --------------------------------------------- '</span> 72<a class="l" name="66" href="#66">66</a><span class="c">' Properties</span> 73<a class="l" name="67" href="#67">67</a><span class="c">' --------------------------------------------- '</span> 74<a class="l" name="68" href="#68">68</a> 75<a class="l" name="69" href="#69">69</a><span class="c">''</span> 76<a class="hl" name="70" href="#70">70</a><span class="c">' Status code that the server returned (e.g. 200).</span> 77<a class="l" name="71" href="#71">71</a><span class="c">'</span> 78<a class="l" name="72" href="#72">72</a><span class="c">' @property StatusCode</span> 79<a class="l" name="73" href="#73">73</a><span class="c">' @type WebStatusCode</span> 80<a class="l" name="74" href="#74">74</a><span class="c">''</span> 81<a class="l" name="75" href="#75">75</a><b>Public</b> <a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a> <b>As</b> <a href="/source/s?defs=WebStatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebStatusCode</a> 82<a class="l" name="76" href="#76">76</a> 83<a class="l" name="77" href="#77">77</a><span class="c">''</span> 84<a class="l" name="78" href="#78">78</a><span class="c">' Status string that the server returned (e.g. `404 -> "Not Found"`)</span> 85<a class="l" name="79" href="#79">79</a><span class="c">'</span> 86<a class="hl" name="80" href="#80">80</a><span class="c">' @property StatusDescription</span> 87<a class="l" name="81" href="#81">81</a><span class="c">' @type String</span> 88<a class="l" name="82" href="#82">82</a><span class="c">''</span> 89<a class="l" name="83" href="#83">83</a><b>Public</b> <a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a> <b>As</b> <b>String</b> 90<a class="l" name="84" href="#84">84</a> 91<a class="l" name="85" href="#85">85</a><span class="c">''</span> 92<a class="l" name="86" href="#86">86</a><span class="c">' Content string that the server returned.</span> 93<a class="l" name="87" href="#87">87</a><span class="c">'</span> 94<a class="l" name="88" href="#88">88</a><span class="c">' @property Content</span> 95<a class="l" name="89" href="#89">89</a><span class="c">' @type String</span> 96<a class="hl" name="90" href="#90">90</a><span class="c">''</span> 97<a class="l" name="91" href="#91">91</a><b>Public</b> <a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a> <b>As</b> <b>String</b> 98<a class="l" name="92" href="#92">92</a> 99<a class="l" name="93" href="#93">93</a><span class="c">''</span> 100<a class="l" name="94" href="#94">94</a><span class="c">' Raw bytes for the response.</span> 101<a class="l" name="95" href="#95">95</a><span class="c">'</span> 102<a class="l" name="96" href="#96">96</a><span class="c">' @property Body</span> 103<a class="l" name="97" href="#97">97</a><span class="c">' @type Byte()</span> 104<a class="l" name="98" href="#98">98</a><span class="c">''</span> 105<a class="l" name="99" href="#99">99</a><b>Public</b> <a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a> <b>As</b> <b>Variant</b> 106<a class="hl" name="100" href="#100">100</a> 107<a class="l" name="101" href="#101">101</a><span class="c">''</span> 108<a class="l" name="102" href="#102">102</a><span class="c">' Parsed `Content` or `Body` based on the `WebRequest.ResponseFormat`.</span> 109<a class="l" name="103" href="#103">103</a><span class="c">'</span> 110<a class="l" name="104" href="#104">104</a><span class="c">' @property Data</span> 111<a class="l" name="105" href="#105">105</a><span class="c">' @type Dictionary|Collection</span> 112<a class="l" name="106" href="#106">106</a><span class="c">''</span> 113<a class="l" name="107" href="#107">107</a><b>Public</b> <a href="/source/s?defs=Data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Data</a> <b>As</b> <b>Object</b> 114<a class="l" name="108" href="#108">108</a> 115<a class="l" name="109" href="#109">109</a><span class="c">''</span> 116<a class="hl" name="110" href="#110">110</a><span class="c">' Headers that were included with the response.</span> 117<a class="l" name="111" href="#111">111</a><span class="c">' (`Collection` of `KeyValue`)</span> 118<a class="l" name="112" href="#112">112</a><span class="c">'</span> 119<a class="l" name="113" href="#113">113</a><span class="c">' @property Headers</span> 120<a class="l" name="114" href="#114">114</a><span class="c">' @type Collection</span> 121<a class="l" name="115" href="#115">115</a><span class="c">''</span> 122<a class="l" name="116" href="#116">116</a><b>Public</b> <a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a> 123<a class="l" name="117" href="#117">117</a> 124<a class="l" name="118" href="#118">118</a><span class="c">''</span> 125<a class="l" name="119" href="#119">119</a><span class="c">' Cookies that were included with the response.</span> 126<a class="hl" name="120" href="#120">120</a><span class="c">' (`Collection` of `KeyValue`)</span> 127<a class="l" name="121" href="#121">121</a><span class="c">'</span> 128<a class="l" name="122" href="#122">122</a><span class="c">' @property Cookies</span> 129<a class="l" name="123" href="#123">123</a><span class="c">' @type Collection</span> 130<a class="l" name="124" href="#124">124</a><span class="c">''</span> 131<a class="l" name="125" href="#125">125</a><b>Public</b> <a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a> <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a> 132<a class="l" name="126" href="#126">126</a> 133<a class="l" name="127" href="#127">127</a><span class="c">' ============================================= '</span> 134<a class="l" name="128" href="#128">128</a><span class="c">' Public Methods</span> 135<a class="l" name="129" href="#129">129</a><span class="c">' ============================================= '</span> 136<a class="hl" name="130" href="#130">130</a> 137<a class="l" name="131" href="#131">131</a><span class="c">''</span> 138<a class="l" name="132" href="#132">132</a><span class="c">' Helper for updating the response with the given updated response values.</span> 139<a class="l" name="133" href="#133">133</a><span class="c">' Useful for `ByRef` cases to update response in place.</span> 140<a class="l" name="134" href="#134">134</a><span class="c">'</span> 141<a class="l" name="135" href="#135">135</a><span class="c">' @method Update</span> 142<a class="l" name="136" href="#136">136</a><span class="c">' @param Updated {WebResponse} Updated `WebResponse` to pull updated values from</span> 143<a class="l" name="137" href="#137">137</a><span class="c">''</span> 144<a class="l" name="138" href="#138">138</a><b>Public</b> <b>Sub</b> <a href="/source/s?defs=Update" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Update</a>(<a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a> <b>As</b> <a href="/source/s?defs=WebResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebResponse</a>) 145<a class="l" name="139" href="#139">139</a> <b>Me</b>.<a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a> 146<a class="hl" name="140" href="#140">140</a> <b>Me</b>.<a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a> 147<a class="l" name="141" href="#141">141</a> <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a> 148<a class="l" name="142" href="#142">142</a> <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a> 149<a class="l" name="143" href="#143">143</a> <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> 150<a class="l" name="144" href="#144">144</a> <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a> 151<a class="l" name="145" href="#145">145</a> <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Data</a> = <a href="/source/s?defs=Updated" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Updated</a>.<a href="/source/s?defs=Data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Data</a> 152<a class="l" name="146" href="#146">146</a><b>End</b> <b>Sub</b> 153<a class="l" name="147" href="#147">147</a> 154<a class="l" name="148" href="#148">148</a><span class="c">''</span> 155<a class="l" name="149" href="#149">149</a><span class="c">' Create response from http</span> 156<a class="hl" name="150" href="#150">150</a><span class="c">'</span> 157<a class="l" name="151" href="#151">151</a><span class="c">' @internal</span> 158<a class="l" name="152" href="#152">152</a><span class="c">' @method CreateFromHttp</span> 159<a class="l" name="153" href="#153">153</a><span class="c">' @param {WebClient} Client</span> 160<a class="l" name="154" href="#154">154</a><span class="c">' @param {WebRequest} Request</span> 161<a class="l" name="155" href="#155">155</a><span class="c">' @param {WinHttpRequest} Http</span> 162<a class="l" name="156" href="#156">156</a><span class="c">' @throws 11030 / 80042b16 / -2147210474 - Error creating from http</span> 163<a class="l" name="157" href="#157">157</a><span class="c">''</span> 164<a class="l" name="158" href="#158">158</a><b>Public</b> <b>Sub</b> <a href="/source/s?defs=CreateFromHttp" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CreateFromHttp</a>(<a href="/source/s?defs=Client" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Client</a> <b>As</b> <a href="/source/s?defs=WebClient" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebClient</a>, <a href="/source/s?defs=Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Request</a> <b>As</b> <a href="/source/s?defs=WebRequest" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebRequest</a>, <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a> <b>As</b> <b>Object</b>) 165<a class="l" name="159" href="#159">159</a> <b>On</b> <b>Error</b> <b>GoTo</b> <a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a> 166<a class="hl" name="160" href="#160">160</a> 167<a class="l" name="161" href="#161">161</a> <b>Me</b>.<a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a> = <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=Status" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Status</a> 168<a class="l" name="162" href="#162">162</a> <b>Me</b>.<a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a> = <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=StatusText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusText</a> 169<a class="l" name="163" href="#163">163</a> <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a> = <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=ResponseText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseText</a> 170<a class="l" name="164" href="#164">164</a> <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a> = <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=ResponseBody" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseBody</a> 171<a class="l" name="165" href="#165">165</a> 172<a class="l" name="166" href="#166">166</a> <a href="/source/s?defs=web_LoadValues" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_LoadValues</a> <a href="/source/s?defs=Http" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Http</a>.<a href="/source/s?defs=GetAllResponseHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">GetAllResponseHeaders</a>, <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a>, <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a>, <a href="/source/s?defs=Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Request</a> 173<a class="l" name="167" href="#167">167</a> 174<a class="l" name="168" href="#168">168</a> <b>Exit</b> <b>Sub</b> 175<a class="l" name="169" href="#169">169</a> 176<a class="hl" name="170" href="#170">170</a><a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a>: 177<a class="l" name="171" href="#171">171</a> 178<a class="l" name="172" href="#172">172</a> <b>Dim</b> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> <b>As</b> <b>String</b> 179<a class="l" name="173" href="#173">173</a> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> = <span class="s">"An error occurred while creating response from http"</span> & <a href="/source/s?defs=vbNewLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbNewLine</a> & _ 180<a class="l" name="174" href="#174">174</a> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> & <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=IIf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IIf</a>(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> < <span class="n">0</span>, <span class="s">" ("</span> & <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=LCase" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LCase</a>$(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Hex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Hex</a>$(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a>)) & <span class="s">")"</span>, <span class="s">""</span>) & <span class="s">": "</span> & <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Description" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Description</a> 181<a class="l" name="175" href="#175">175</a> 182<a class="l" name="176" href="#176">176</a> <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogError</a> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a>, <span class="s">"WebResponse.CreateFromHttp"</span>, <span class="n">11030</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a> 183<a class="l" name="177" href="#177">177</a> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Raise" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Raise</a> <span class="n">11030</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a>, <span class="s">"WebResponse.CreateFromHttp"</span>, <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> 184<a class="l" name="178" href="#178">178</a><b>End</b> <b>Sub</b> 185<a class="l" name="179" href="#179">179</a> 186<a class="hl" name="180" href="#180">180</a><span class="c">''</span> 187<a class="l" name="181" href="#181">181</a><span class="c">' Create response from cURL</span> 188<a class="l" name="182" href="#182">182</a><span class="c">'</span> 189<a class="l" name="183" href="#183">183</a><span class="c">' @internal</span> 190<a class="l" name="184" href="#184">184</a><span class="c">' @method CreateFromCurl</span> 191<a class="l" name="185" href="#185">185</a><span class="c">' @param {WebClient} Client</span> 192<a class="l" name="186" href="#186">186</a><span class="c">' @param {WebRequest} Request</span> 193<a class="l" name="187" href="#187">187</a><span class="c">' @param {String} Result</span> 194<a class="l" name="188" href="#188">188</a><span class="c">' @throws 11031 / 80042b17 / -2147210473 - Error creating from cURL</span> 195<a class="l" name="189" href="#189">189</a><span class="c">''</span> 196<a class="hl" name="190" href="#190">190</a><b>Public</b> <b>Sub</b> <a href="/source/s?defs=CreateFromCurl" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CreateFromCurl</a>(<a href="/source/s?defs=Client" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Client</a> <b>As</b> <a href="/source/s?defs=WebClient" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebClient</a>, <a href="/source/s?defs=Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Request</a> <b>As</b> <a href="/source/s?defs=WebRequest" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebRequest</a>, <a href="/source/s?defs=Result" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Result</a> <b>As</b> <b>String</b>) 197<a class="l" name="191" href="#191">191</a> <b>On</b> <b>Error</b> <b>GoTo</b> <a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a> 198<a class="l" name="192" href="#192">192</a> 199<a class="l" name="193" href="#193">193</a> <b>Dim</b> <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>() <b>As</b> <b>String</b> 200<a class="l" name="194" href="#194">194</a> 201<a class="l" name="195" href="#195">195</a> <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=Result" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Result</a>, <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a>) 202<a class="l" name="196" href="#196">196</a> 203<a class="l" name="197" href="#197">197</a> <b>Me</b>.<a href="/source/s?defs=StatusCode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusCode</a> = <a href="/source/s?defs=web_ExtractStatusFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusFromCurlResponse</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>) 204<a class="l" name="198" href="#198">198</a> <b>Me</b>.<a href="/source/s?defs=StatusDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StatusDescription</a> = <a href="/source/s?defs=web_ExtractStatusTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusTextFromCurlResponse</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>) 205<a class="l" name="199" href="#199">199</a> <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a> = <a href="/source/s?defs=web_ExtractResponseTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractResponseTextFromCurlResponse</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>) 206<a class="hl" name="200" href="#200">200</a> <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a> = <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=StringToAnsiBytes" class="intelliWindow-symbol" data-definition-place="undefined-in-file">StringToAnsiBytes</a>(<b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a>) 207<a class="l" name="201" href="#201">201</a> 208<a class="l" name="202" href="#202">202</a> <a href="/source/s?defs=web_LoadValues" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_LoadValues</a> <a href="/source/s?defs=web_ExtractHeadersFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractHeadersFromCurlResponse</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>), <b>Me</b>.<a href="/source/s?defs=Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Content</a>, <b>Me</b>.<a href="/source/s?defs=Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Body</a>, <a href="/source/s?defs=Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Request</a> 209<a class="l" name="203" href="#203">203</a> 210<a class="l" name="204" href="#204">204</a> <b>Exit</b> <b>Sub</b> 211<a class="l" name="205" href="#205">205</a> 212<a class="l" name="206" href="#206">206</a><a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a>: 213<a class="l" name="207" href="#207">207</a> 214<a class="l" name="208" href="#208">208</a> <b>Dim</b> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> <b>As</b> <b>String</b> 215<a class="l" name="209" href="#209">209</a> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> = <span class="s">"An error occurred while creating response from cURL"</span> & <a href="/source/s?defs=vbNewLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbNewLine</a> & _ 216<a class="hl" name="210" href="#210">210</a> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> & <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=IIf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IIf</a>(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> < <span class="n">0</span>, <span class="s">" ("</span> & <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=LCase" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LCase</a>$(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Hex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Hex</a>$(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a>)) & <span class="s">")"</span>, <span class="s">""</span>) & <span class="s">": "</span> & <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Description" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Description</a> 217<a class="l" name="211" href="#211">211</a> 218<a class="l" name="212" href="#212">212</a> <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogError</a> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a>, <span class="s">"WebResponse.CreateFromCurl"</span>, <span class="n">11031</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a> 219<a class="l" name="213" href="#213">213</a> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Raise" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Raise</a> <span class="n">11031</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a>, <span class="s">"WebResponse.CreateFromCurl"</span>, <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> 220<a class="l" name="214" href="#214">214</a><b>End</b> <b>Sub</b> 221<a class="l" name="215" href="#215">215</a> 222<a class="l" name="216" href="#216">216</a><span class="c">''</span> 223<a class="l" name="217" href="#217">217</a><span class="c">' Extract headers from response headers</span> 224<a class="l" name="218" href="#218">218</a><span class="c">'</span> 225<a class="l" name="219" href="#219">219</a><span class="c">' @internal</span> 226<a class="hl" name="220" href="#220">220</a><span class="c">' @method ExtractHeaders</span> 227<a class="l" name="221" href="#221">221</a><span class="c">' @param {String} ResponseHeaders</span> 228<a class="l" name="222" href="#222">222</a><span class="c">' @return {Collection} Headers</span> 229<a class="l" name="223" href="#223">223</a><span class="c">' @throws 11032 / 80042b18 / -2147210472 - Error extracting headers</span> 230<a class="l" name="224" href="#224">224</a><span class="c">''</span> 231<a class="l" name="225" href="#225">225</a><b>Public</b> <b>Function</b> <a href="/source/s?defs=ExtractHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractHeaders</a>(<a href="/source/s?defs=ResponseHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseHeaders</a> <b>As</b> <b>String</b>) <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a> 232<a class="l" name="226" href="#226">226</a> <b>On</b> <b>Error</b> <b>GoTo</b> <a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a> 233<a class="l" name="227" href="#227">227</a> 234<a class="l" name="228" href="#228">228</a> <b>Dim</b> <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a> <b>As</b> <b>Variant</b> 235<a class="l" name="229" href="#229">229</a> <b>Dim</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a> <b>As</b> <b>Integer</b> 236<a class="hl" name="230" href="#230">230</a> <b>Dim</b> <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a> <b>As</b> <b>New</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a> 237<a class="l" name="231" href="#231">231</a> <b>Dim</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>As</b> <a href="/source/s?defs=Dictionary" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Dictionary</a> 238<a class="l" name="232" href="#232">232</a> <b>Dim</b> <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> <b>As</b> <b>Long</b> 239<a class="l" name="233" href="#233">233</a> <b>Dim</b> <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> <b>As</b> <b>Boolean</b> 240<a class="l" name="234" href="#234">234</a> 241<a class="l" name="235" href="#235">235</a> <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=ResponseHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseHeaders</a>, <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a>) 242<a class="l" name="236" href="#236">236</a> 243<a class="l" name="237" href="#237">237</a> <b>For</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a> = <a href="/source/s?defs=LBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LBound</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>) <b>To</b> (<a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>) + <span class="n">1</span>) 244<a class="l" name="238" href="#238">238</a> <b>If</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a> > <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>) <b>Then</b> 245<a class="l" name="239" href="#239">239</a> <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> 246<a class="hl" name="240" href="#240">240</a> <b>ElseIf</b> <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>) <> <span class="s">""</span> <b>Then</b> 247<a class="l" name="241" href="#241">241</a> <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>), <span class="s">":"</span>) 248<a class="l" name="242" href="#242">242</a> <b>If</b> <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> = <span class="n">0</span> <b>And</b> <b>Not</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>Is</b> <b>Nothing</b> <b>Then</b> 249<a class="l" name="243" href="#243">243</a> <span class="c">' Assume part of multi-line header</span> 250<a class="l" name="244" href="#244">244</a> <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> = <b>True</b> 251<a class="l" name="245" href="#245">245</a> <b>ElseIf</b> <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> <b>Then</b> 252<a class="l" name="246" href="#246">246</a> <span class="c">' Close out multi-line string</span> 253<a class="l" name="247" href="#247">247</a> <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> = <b>False</b> 254<a class="l" name="248" href="#248">248</a> <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> 255<a class="l" name="249" href="#249">249</a> <b>ElseIf</b> <b>Not</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>Is</b> <b>Nothing</b> <b>Then</b> 256<a class="hl" name="250" href="#250">250</a> <span class="c">' Add previous header</span> 257<a class="l" name="251" href="#251">251</a> <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> 258<a class="l" name="252" href="#252">252</a> <b>End</b> <b>If</b> 259<a class="l" name="253" href="#253">253</a> 260<a class="l" name="254" href="#254">254</a> <b>If</b> <b>Not</b> <a href="/source/s?defs=web_Multiline" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Multiline</a> <b>Then</b> 261<a class="l" name="255" href="#255">255</a> <b>Set</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> = <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=CreateKeyValue" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CreateKeyValue</a>( _ 262<a class="l" name="256" href="#256">256</a> <a href="/source/s?defs=Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Key</a>:=<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Trim" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Trim</a>(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>), <span class="n">1</span>, <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> - <span class="n">1</span>)), _ 263<a class="l" name="257" href="#257">257</a> <a href="/source/s?defs=Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Value</a>:=<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Trim" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Trim</a>(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>), <a href="/source/s?defs=web_ColonPosition" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ColonPosition</a> + <span class="n">1</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Len" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Len</a>(<a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>)))) _ 264<a class="l" name="258" href="#258">258</a> ) 265<a class="l" name="259" href="#259">259</a> <b>Else</b> 266<a class="hl" name="260" href="#260">260</a> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>(<span class="s">"Value"</span>) = <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>(<span class="s">"Value"</span>) & <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a> & <a href="/source/s?defs=web_Lines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Lines</a>(<a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a>) 267<a class="l" name="261" href="#261">261</a> <b>End</b> <b>If</b> 268<a class="l" name="262" href="#262">262</a> <b>End</b> <b>If</b> 269<a class="l" name="263" href="#263">263</a> <b>Next</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a> 270<a class="l" name="264" href="#264">264</a> 271<a class="l" name="265" href="#265">265</a> <b>Set</b> <a href="/source/s?defs=ExtractHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractHeaders</a> = <a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a> 272<a class="l" name="266" href="#266">266</a> <b>Exit</b> <b>Function</b> 273<a class="l" name="267" href="#267">267</a> 274<a class="l" name="268" href="#268">268</a><a href="/source/s?defs=web_ErrorHandling" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorHandling</a>: 275<a class="l" name="269" href="#269">269</a> 276<a class="hl" name="270" href="#270">270</a> <b>Dim</b> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> <b>As</b> <b>String</b> 277<a class="l" name="271" href="#271">271</a> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> = <span class="s">"An error occurred while extracting headers"</span> & <a href="/source/s?defs=vbNewLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbNewLine</a> & _ 278<a class="l" name="272" href="#272">272</a> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> & <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=IIf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">IIf</a>(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> < <span class="n">0</span>, <span class="s">" ("</span> & <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=LCase" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LCase</a>$(<a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Hex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Hex</a>$(<a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a>)) & <span class="s">")"</span>, <span class="s">""</span>) & <span class="s">": "</span> & <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Description" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Description</a> 279<a class="l" name="273" href="#273">273</a> 280<a class="l" name="274" href="#274">274</a> <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogError</a> <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a>, <span class="s">"WebResponse.CreateFromCurl"</span>, <span class="n">11032</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a> 281<a class="l" name="275" href="#275">275</a> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Raise" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Raise</a> <span class="n">11032</span> + <a href="/source/s?defs=vbObjectError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vbObjectError</a>, <span class="s">"WebResponse.CreateFromCurl"</span>, <a href="/source/s?defs=web_ErrorDescription" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ErrorDescription</a> 282<a class="l" name="276" href="#276">276</a><b>End</b> <b>Function</b> 283<a class="l" name="277" href="#277">277</a> 284<a class="l" name="278" href="#278">278</a><span class="c">''</span> 285<a class="l" name="279" href="#279">279</a><span class="c">' Extract cookies from response headers</span> 286<a class="hl" name="280" href="#280">280</a><span class="c">'</span> 287<a class="l" name="281" href="#281">281</a><span class="c">' @internal</span> 288<a class="l" name="282" href="#282">282</a><span class="c">' @method ExtractCookies</span> 289<a class="l" name="283" href="#283">283</a><span class="c">' @param {Collection} Headers</span> 290<a class="l" name="284" href="#284">284</a><span class="c">' @return {Collection} Cookies</span> 291<a class="l" name="285" href="#285">285</a><span class="c">''</span> 292<a class="l" name="286" href="#286">286</a><b>Public</b> <b>Function</b> <a href="/source/s?defs=ExtractCookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractCookies</a>(<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a>) <b>As</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a> 293<a class="l" name="287" href="#287">287</a> <b>Dim</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>As</b> <a href="/source/s?defs=Dictionary" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Dictionary</a> 294<a class="l" name="288" href="#288">288</a> <b>Dim</b> <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a> <b>As</b> <b>String</b> 295<a class="l" name="289" href="#289">289</a> <b>Dim</b> <a href="/source/s?defs=web_Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Key</a> <b>As</b> <b>String</b> 296<a class="hl" name="290" href="#290">290</a> <b>Dim</b> <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a> <b>As</b> <b>String</b> 297<a class="l" name="291" href="#291">291</a> <b>Dim</b> <a href="/source/s?defs=web_Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookies</a> <b>As</b> <b>New</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a> 298<a class="l" name="292" href="#292">292</a> 299<a class="l" name="293" href="#293">293</a> <b>For</b> <b>Each</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> <b>In</b> <a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> 300<a class="l" name="294" href="#294">294</a> <b>If</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>(<span class="s">"Key"</span>) = <span class="s">"Set-Cookie"</span> <b>Then</b> 301<a class="l" name="295" href="#295">295</a> <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a> = <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a>(<span class="s">"Value"</span>) 302<a class="l" name="296" href="#296">296</a> <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="s">"="</span>) > <span class="n">0</span> <b>Then</b> 303<a class="l" name="297" href="#297">297</a> <a href="/source/s?defs=web_Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Key</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="n">1</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="s">"="</span>) - <span class="n">1</span>) 304<a class="l" name="298" href="#298">298</a> <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="s">"="</span>) + <span class="n">1</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Len" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Len</a>(<a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>)) 305<a class="l" name="299" href="#299">299</a> 306<a class="hl" name="300" href="#300">300</a> <span class="c">' Ignore text after semi-colon</span> 307<a class="l" name="301" href="#301">301</a> <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="s">";"</span>) > <span class="n">0</span> <b>Then</b> 308<a class="l" name="302" href="#302">302</a> <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="n">1</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=InStr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">InStr</a>(<span class="n">1</span>, <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="s">";"</span>) - <span class="n">1</span>) 309<a class="l" name="303" href="#303">303</a> <b>End</b> <b>If</b> 310<a class="l" name="304" href="#304">304</a> 311<a class="l" name="305" href="#305">305</a> <span class="c">' Ignore surrounding quotes</span> 312<a class="l" name="306" href="#306">306</a> <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Left" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Left</a>$(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="n">1</span>) = <span class="s">""""</span> <b>Then</b> 313<a class="l" name="307" href="#307">307</a> <a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Mid" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Mid</a>$(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <span class="n">2</span>, <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Len" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Len</a>(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>) - <span class="n">2</span>) 314<a class="l" name="308" href="#308">308</a> <b>End</b> <b>If</b> 315<a class="l" name="309" href="#309">309</a> 316<a class="hl" name="310" href="#310">310</a> <a href="/source/s?defs=web_Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookies</a>.<a href="/source/s?defs=Add" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Add</a> <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=CreateKeyValue" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CreateKeyValue</a>(<a href="/source/s?defs=web_Key" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Key</a>, <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=UrlDecode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UrlDecode</a>(<a href="/source/s?defs=web_Value" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Value</a>, <a href="/source/s?defs=PlusAsSpace" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PlusAsSpace</a>:=<b>False</b>, <a href="/source/s?defs=EncodingMode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">EncodingMode</a>:=<a href="/source/s?defs=UrlEncodingMode" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UrlEncodingMode</a>.<a href="/source/s?defs=CookieUrlEncoding" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CookieUrlEncoding</a>)) 317<a class="l" name="311" href="#311">311</a> <b>Else</b> 318<a class="l" name="312" href="#312">312</a> <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogWarning" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogWarning</a> _ 319<a class="l" name="313" href="#313">313</a> <span class="s">"Unrecognized cookie format: "</span> & <a href="/source/s?defs=web_Cookie" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookie</a>, <span class="s">"WebResponse.ExtractCookies"</span> 320<a class="l" name="314" href="#314">314</a> <b>End</b> <b>If</b> 321<a class="l" name="315" href="#315">315</a> <b>End</b> <b>If</b> 322<a class="l" name="316" href="#316">316</a> <b>Next</b> <a href="/source/s?defs=web_Header" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Header</a> 323<a class="l" name="317" href="#317">317</a> 324<a class="l" name="318" href="#318">318</a> <b>Set</b> <a href="/source/s?defs=ExtractCookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractCookies</a> = <a href="/source/s?defs=web_Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Cookies</a> 325<a class="l" name="319" href="#319">319</a><b>End</b> <b>Function</b> 326<a class="hl" name="320" href="#320">320</a> 327<a class="l" name="321" href="#321">321</a><span class="c">' ============================================= '</span> 328<a class="l" name="322" href="#322">322</a><span class="c">' Private Functions</span> 329<a class="l" name="323" href="#323">323</a><span class="c">' ============================================= '</span> 330<a class="l" name="324" href="#324">324</a> 331<a class="l" name="325" href="#325">325</a><b>Private</b> <b>Sub</b> <a href="/source/s?defs=web_LoadValues" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_LoadValues</a>(<a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a> <b>As</b> <b>String</b>, <a href="/source/s?defs=web_Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Content</a> <b>As</b> <b>String</b>, <a href="/source/s?defs=web_Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Body</a> <b>As</b> <b>Variant</b>, <a href="/source/s?defs=web_Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Request</a> <b>As</b> <a href="/source/s?defs=WebRequest" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebRequest</a>) 332<a class="l" name="326" href="#326">326</a> <span class="c">' Convert content to data by format</span> 333<a class="l" name="327" href="#327">327</a> <b>If</b> <a href="/source/s?defs=web_Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Request</a>.<a href="/source/s?defs=ResponseFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseFormat</a> <> <a href="/source/s?defs=WebFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebFormat</a>.<a href="/source/s?defs=PlainText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PlainText</a> <b>Then</b> 334<a class="l" name="328" href="#328">328</a> <b>On</b> <b>Error</b> <b>Resume</b> <b>Next</b> 335<a class="l" name="329" href="#329">329</a> <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Data" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Data</a> = _ 336<a class="hl" name="330" href="#330">330</a> <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=ParseByFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ParseByFormat</a>(<a href="/source/s?defs=web_Content" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Content</a>, <a href="/source/s?defs=web_Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Request</a>.<a href="/source/s?defs=ResponseFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ResponseFormat</a>, <a href="/source/s?defs=web_Request" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Request</a>.<a href="/source/s?defs=CustomResponseFormat" class="intelliWindow-symbol" data-definition-place="undefined-in-file">CustomResponseFormat</a>, <a href="/source/s?defs=web_Body" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Body</a>) 337<a class="l" name="331" href="#331">331</a> 338<a class="l" name="332" href="#332">332</a> <b>If</b> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> <> <span class="n">0</span> <b>Then</b> 339<a class="l" name="333" href="#333">333</a> <a href="/source/s?defs=WebHelpers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">WebHelpers</a>.<a href="/source/s?defs=LogError" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LogError</a> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Description" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Description</a>, <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Source" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Source</a>, <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Number" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Number</a> 340<a class="l" name="334" href="#334">334</a> <a href="/source/s?defs=Err" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Err</a>.<a href="/source/s?defs=Clear" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Clear</a> 341<a class="l" name="335" href="#335">335</a> <b>End</b> <b>If</b> 342<a class="l" name="336" href="#336">336</a> <b>On</b> <b>Error</b> <b>GoTo</b> <span class="n">0</span> 343<a class="l" name="337" href="#337">337</a> <b>End</b> <b>If</b> 344<a class="l" name="338" href="#338">338</a> 345<a class="l" name="339" href="#339">339</a> <span class="c">' Extract headers</span> 346<a class="hl" name="340" href="#340">340</a> <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> = <a href="/source/s?defs=ExtractHeaders" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractHeaders</a>(<a href="/source/s?defs=web_Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_Headers</a>) 347<a class="l" name="341" href="#341">341</a> 348<a class="l" name="342" href="#342">342</a> <span class="c">' Extract cookies</span> 349<a class="l" name="343" href="#343">343</a> <b>Set</b> <b>Me</b>.<a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a> = <a href="/source/s?defs=ExtractCookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ExtractCookies</a>(<b>Me</b>.<a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a>) 350<a class="l" name="344" href="#344">344</a><b>End</b> <b>Sub</b> 351<a class="l" name="345" href="#345">345</a> 352<a class="l" name="346" href="#346">346</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_ExtractStatusFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusFromCurlResponse</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>Long</b> 353<a class="l" name="347" href="#347">347</a> <b>Dim</b> <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a>() <b>As</b> <b>String</b> 354<a class="l" name="348" href="#348">348</a> 355<a class="l" name="349" href="#349">349</a> <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)), <span class="s">" "</span>) 356<a class="hl" name="350" href="#350">350</a> <a href="/source/s?defs=web_ExtractStatusFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusFromCurlResponse</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<b>CLng</b>(<a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a>(<span class="n">1</span>)) 357<a class="l" name="351" href="#351">351</a><b>End</b> <b>Function</b> 358<a class="l" name="352" href="#352">352</a> 359<a class="l" name="353" href="#353">353</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_ExtractStatusTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusTextFromCurlResponse</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>String</b> 360<a class="l" name="354" href="#354">354</a> <b>Dim</b> <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a>() <b>As</b> <b>String</b> 361<a class="l" name="355" href="#355">355</a> <b>Dim</b> <a href="/source/s?defs=web_i" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_i</a> <b>As</b> <b>Long</b> 362<a class="l" name="356" href="#356">356</a> <b>Dim</b> <a href="/source/s?defs=web_StatusText" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusText</a> <b>As</b> <b>String</b> 363<a class="l" name="357" href="#357">357</a> 364<a class="l" name="358" href="#358">358</a> <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>)), <span class="s">" "</span>, <span class="n">3</span>) 365<a class="l" name="359" href="#359">359</a> <a href="/source/s?defs=web_ExtractStatusTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractStatusTextFromCurlResponse</a> = <a href="/source/s?defs=web_StatusLineParts" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineParts</a>(<span class="n">2</span>) 366<a class="hl" name="360" href="#360">360</a><b>End</b> <b>Function</b> 367<a class="l" name="361" href="#361">361</a> 368<a class="l" name="362" href="#362">362</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_ExtractHeadersFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractHeadersFromCurlResponse</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>String</b> 369<a class="l" name="363" href="#363">363</a> <b>Dim</b> <a href="/source/s?defs=web_StatusLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineIndex</a> <b>As</b> <b>Long</b> 370<a class="l" name="364" href="#364">364</a> <b>Dim</b> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> <b>As</b> <b>Long</b> 371<a class="l" name="365" href="#365">365</a> <b>Dim</b> <a href="/source/s?defs=web_HeaderLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_HeaderLines</a>() <b>As</b> <b>String</b> 372<a class="l" name="366" href="#366">366</a> <b>Dim</b> <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> <b>As</b> <b>Long</b> 373<a class="l" name="367" href="#367">367</a> <b>Dim</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> <b>As</b> <b>Long</b> 374<a class="l" name="368" href="#368">368</a> 375<a class="l" name="369" href="#369">369</a> <span class="c">' Find status line and blank line before body</span> 376<a class="hl" name="370" href="#370">370</a> <a href="/source/s?defs=web_StatusLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineIndex</a> = <a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) 377<a class="l" name="371" href="#371">371</a> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> = <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) 378<a class="l" name="372" href="#372">372</a> 379<a class="l" name="373" href="#373">373</a> <span class="c">' Extract headers string</span> 380<a class="l" name="374" href="#374">374</a> <b>ReDim</b> <a href="/source/s?defs=web_HeaderLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_HeaderLines</a>(<span class="n">0</span> <b>To</b> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> - <span class="n">2</span> - <a href="/source/s?defs=web_StatusLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineIndex</a>) 381<a class="l" name="375" href="#375">375</a> 382<a class="l" name="376" href="#376">376</a> <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> = <span class="n">0</span> 383<a class="l" name="377" href="#377">377</a> <b>For</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> = (<a href="/source/s?defs=web_StatusLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_StatusLineIndex</a> + <span class="n">1</span>) <b>To</b> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> - <span class="n">1</span> 384<a class="l" name="378" href="#378">378</a> <a href="/source/s?defs=web_HeaderLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_HeaderLines</a>(<a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a>) = <a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a>) 385<a class="l" name="379" href="#379">379</a> <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> = <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> + <span class="n">1</span> 386<a class="hl" name="380" href="#380">380</a> <b>Next</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> 387<a class="l" name="381" href="#381">381</a> 388<a class="l" name="382" href="#382">382</a> <a href="/source/s?defs=web_ExtractHeadersFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractHeadersFromCurlResponse</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Join" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Join</a>$(<a href="/source/s?defs=web_HeaderLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_HeaderLines</a>, <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a>) 389<a class="l" name="383" href="#383">383</a><b>End</b> <b>Function</b> 390<a class="l" name="384" href="#384">384</a> 391<a class="l" name="385" href="#385">385</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_ExtractResponseTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractResponseTextFromCurlResponse</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>String</b> 392<a class="l" name="386" href="#386">386</a> <b>Dim</b> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> <b>As</b> <b>Long</b> 393<a class="l" name="387" href="#387">387</a> <b>Dim</b> <a href="/source/s?defs=web_BodyLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BodyLines</a>() <b>As</b> <b>String</b> 394<a class="l" name="388" href="#388">388</a> <b>Dim</b> <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> <b>As</b> <b>Long</b> 395<a class="l" name="389" href="#389">389</a> <b>Dim</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> <b>As</b> <b>Long</b> 396<a class="hl" name="390" href="#390">390</a> 397<a class="l" name="391" href="#391">391</a> <span class="c">' Find blank line before body</span> 398<a class="l" name="392" href="#392">392</a> <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> = <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) 399<a class="l" name="393" href="#393">393</a> 400<a class="l" name="394" href="#394">394</a> <span class="c">' Extract body string</span> 401<a class="l" name="395" href="#395">395</a> <b>ReDim</b> <a href="/source/s?defs=web_BodyLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BodyLines</a>(<span class="n">0</span> <b>To</b> <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) - <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> - <span class="n">1</span>) 402<a class="l" name="396" href="#396">396</a> 403<a class="l" name="397" href="#397">397</a> <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> = <span class="n">0</span> 404<a class="l" name="398" href="#398">398</a> <b>For</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> = <a href="/source/s?defs=web_BlankLineIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BlankLineIndex</a> + <span class="n">1</span> <b>To</b> <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) 405<a class="l" name="399" href="#399">399</a> <a href="/source/s?defs=web_BodyLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BodyLines</a>(<a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a>) = <a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a>) 406<a class="hl" name="400" href="#400">400</a> <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> = <a href="/source/s?defs=web_WriteIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_WriteIndex</a> + <span class="n">1</span> 407<a class="l" name="401" href="#401">401</a> <b>Next</b> <a href="/source/s?defs=web_ReadIndex" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ReadIndex</a> 408<a class="l" name="402" href="#402">402</a> 409<a class="l" name="403" href="#403">403</a> <a href="/source/s?defs=web_ExtractResponseTextFromCurlResponse" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_ExtractResponseTextFromCurlResponse</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Join" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Join</a>$(<a href="/source/s?defs=web_BodyLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_BodyLines</a>, <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a>) 410<a class="l" name="404" href="#404">404</a><b>End</b> <b>Function</b> 411<a class="l" name="405" href="#405">405</a> 412<a class="l" name="406" href="#406">406</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>Long</b> 413<a class="l" name="407" href="#407">407</a> <span class="c">' Special case for cURL: 100 Continue is included before final status code</span> 414<a class="l" name="408" href="#408">408</a> <span class="c">' -> ignore 100 and find final status code (next non-100 status code)</span> 415<a class="l" name="409" href="#409">409</a> <b>For</b> <a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a> = <a href="/source/s?defs=LBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">LBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) <b>To</b> <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) 416<a class="hl" name="410" href="#410">410</a> <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Trim" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Trim</a>$(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>)) <> <span class="s">""</span> <b>Then</b> 417<a class="l" name="411" href="#411">411</a> <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Split" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Split</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>), <span class="s">" "</span>)(<span class="n">1</span>) <> <span class="s">"100"</span> <b>Then</b> 418<a class="l" name="412" href="#412">412</a> <b>Exit</b> <b>Function</b> 419<a class="l" name="413" href="#413">413</a> <b>End</b> <b>If</b> 420<a class="l" name="414" href="#414">414</a> <b>End</b> <b>If</b> 421<a class="l" name="415" href="#415">415</a> <b>Next</b> <a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a> 422<a class="l" name="416" href="#416">416</a><b>End</b> <b>Function</b> 423<a class="l" name="417" href="#417">417</a> 424<a class="l" name="418" href="#418">418</a><b>Private</b> <b>Function</b> <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>() <b>As</b> <b>String</b>) <b>As</b> <b>Long</b> 425<a class="l" name="419" href="#419">419</a> <b>For</b> <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a> = (<a href="/source/s?defs=web_FindStatusLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindStatusLine</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) + <span class="n">1</span>) <b>To</b> <a href="/source/s?defs=UBound" class="intelliWindow-symbol" data-definition-place="undefined-in-file">UBound</a>(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>) 426<a class="hl" name="420" href="#420">420</a> <b>If</b> <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Trim" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Trim</a>$(<a href="/source/s?defs=web_CurlResponseLines" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CurlResponseLines</a>(<a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a>)) = <span class="s">""</span> <b>Then</b> 427<a class="l" name="421" href="#421">421</a> <b>Exit</b> <b>Function</b> 428<a class="l" name="422" href="#422">422</a> <b>End</b> <b>If</b> 429<a class="l" name="423" href="#423">423</a> <b>Next</b> <a href="/source/s?defs=web_FindBlankLine" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_FindBlankLine</a> 430<a class="l" name="424" href="#424">424</a><b>End</b> <b>Function</b> 431<a class="l" name="425" href="#425">425</a> 432<a class="l" name="426" href="#426">426</a><b>Private</b> <b>Sub</b> <a href="/source/s?defs=Class_Initialize" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Class_Initialize</a>() 433<a class="l" name="427" href="#427">427</a> <a href="/source/s?defs=web_CrLf" class="intelliWindow-symbol" data-definition-place="undefined-in-file">web_CrLf</a> = <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Chr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Chr</a>$(<span class="n">&HA</span>) & <a href="/source/s?defs=VBA" class="intelliWindow-symbol" data-definition-place="undefined-in-file">VBA</a>.<a href="/source/s?defs=Chr" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Chr</a>$(<span class="n">&o12</span>) 434<a class="l" name="428" href="#428">428</a> 435<a class="l" name="429" href="#429">429</a> <b>Set</b> <a href="/source/s?defs=Headers" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Headers</a> = <b>New</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a> 436<a class="hl" name="430" href="#430">430</a> <b>Set</b> <a href="/source/s?defs=Cookies" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Cookies</a> = <b>New</b> <a href="/source/s?defs=Collection" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Collection</a> 437<a class="l" name="431" href="#431">431</a><b>End</b> <b>Sub</b> 438<a class="l" name="432" href="#432">432</a> 439<a class="l" name="433" href="#433">433</a><b>Private</b> <b>Sub</b> <a href="/source/s?defs=Test_strings" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Test_strings</a>() 440<a class="l" name="434" href="#434">434</a> <b>Dim</b> <a href="/source/s?defs=foo1" class="intelliWindow-symbol" data-definition-place="undefined-in-file">foo1</a>() <b>As</b> <b>String</b> 441<a class="l" name="435" href="#435">435</a> <b>Set</b> <a href="/source/s?defs=foo1" class="intelliWindow-symbol" data-definition-place="undefined-in-file">foo1</a> = <span class="s">" testing</span> 442<a class="l" name="436" href="#436">436</a><span class="s"> 1-2-3"</span> 443<a class="l" name="437" href="#437">437</a><b>End</b> <b>Sub</b> 444<a class="l" name="438" href="#438">438</a></body> 445</html> 446