<doc>
  <legacy_id>2460</legacy_id>
  <name>libURLLastHTTPHeaders</name>
  <type>function</type>
  <syntax>
    <example>libURLLastHTTPHeaders()</example>
  </syntax>
  <library>Internet library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Networks &amp; Communication</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <function tag="libURLLastRHHeaders">libURLLastRHHeaders Function</function>
    <command tag="libURLSetCustomHTTPHeaders">libURLSetCustomHTTPHeaders Command</command>
    <command tag="libURLFollowHttpRedirects">libURLFollowHttpRedirects Command</command>
  </references>
  <history>
    <introduced version="1.1.1">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
    <network/>
  </security>
  <summary><glossary tag="return">Returns</glossary> the <function tag="value">value</function> of the <property tag="httpHeaders">httpHeaders</property> <glossary tag="property">property</glossary> used for the previous <keyword tag="http">HTTP</keyword> request.</summary>
  <examples>
    <example>put libURLLastHTTPHeaders() into headersToAnalyze</example>
    <example>if probReq is among the lines of libURLLastHTTPHeaders() then tryAgain</example>
  </examples>
  <description>
    <p>Use the <b>libURLLastHTTPHeaders</b> <control_st tag="function">function</control_st> to debug problems with <keyword tag="http">HTTP</keyword> transfers, or to report errors to advanced users.</p><p/><p><b>Value:</b></p><p>The <b>libURLLastHTTPHeaders</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a string.</p><p/><p><b>Comments:</b></p><p>You can set the <b>httpHeaders</b> <glossary tag="property">property</glossary> to send custom headers in addition to the default headers. Whenever LiveCode contacts a <glossary tag="web server">web server</glossary> to <glossary tag="download">download</glossary> a page (with the <command tag="load">load</command> <glossary tag="command">command</glossary> or by using a <keyword tag="URL">URL</keyword> in an <glossary tag="expression">expression</glossary>) or to post data (with the <command tag="post">post</command> <glossary tag="command">command</glossary>), the contents of the <property tag="httpHeaders">httpHeaders</property> <glossary tag="property">property</glossary> is sent to the <glossary tag="web server">web server</glossary>. The <b>libURLLastHTTPHeaders</b> <control_st tag="function">function</control_st> returns the last set of custom headers used.</p><p/><p><img src="202653"/> <b>Important!</b> The <b>libURLLastHTTPHeaders</b> <control_st tag="function">function</control_st> is part of the <glossary tag="Internet library">Internet library</glossary>. To ensure that the <control_st tag="function">function</control_st> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure "Internet Library" is selected in the list of script libraries.</p>
  </description>
</doc>