<doc>
	<legacy_id>1689</legacy_id>
	<name>libURLFormData</name>
	<type>function</type>

	<syntax>
		<example>libURLFormData(<i>key_1</i>, <i>value_1</i>, ..., <i>key_n</i>, <i>value_n</i>)</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary><b>libURLFormData</b> formats data in the standard format suitable for sending to form processing CGIs and other processes on a web server. </summary>

	<examples>
<example><p>put &quot;John&quot; into tName</p><p>put &quot;Hello&quot; into tMessage</p><p>get libURLFormData(&quot;name&quot;, tName,&quot;message&quot;, tMessage)</p><p>post it to url &quot;http://www.someserver.com/cgi-bin/form.pl&quot;</p><p></p><p>In this case, the data posted to the url will look like this: name=John&amp;message=Hello</p></example>
	</examples>

	<history>
		<introduced version="2.5">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
	</classes>

	<security>
		<network/>
	</security>


	<classification>
	</classification>

	<references>
		<function tag="libURLMultipartFormAddPart">libURLMultipartFormAddPart Function</function>
		<function tag="libURLMultipartFormData">libURLMultipartFormData Function</function>
		<command tag="post">post Command</command>
		<command tag="libURLSetExpect100">libURLSetExpect100 Command</command>
	</references>

	<description>
	<overview>The function accepts variable numbers of parameters and treats them as key-value pairs. The first parameter is the name of the first form part, the second the value of the first part, the third is the name of the second part, and so on. <p></p><p></p><note>The Content-Type header is set to &quot;Content-Type: application/x-www-form-urlencoded&quot; by default when using post. There is no need to set the httpHeaders unless you have previously set the Content-Type header to something else. </note><p></p><p></p><important>The <b>libURLFormData</b> <glossary tag="function">function</glossary> is part of the <glossary tag="Internet library">Internet library</glossary>. To ensure that the <glossary tag="keyword">keyword</glossary> 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 &quot;Internet Library&quot; is selected in the list of script libraries.</important><p></p><p></p><note>When included in a <glossary tag="standalone application">standalone application</glossary>, the <glossary tag="Internet library">Internet library</glossary> is implemented as a hidden <command tag="group">group</command> and made available when the <command tag="group">group</command> receives its first <message tag="openBackground">openBackground</message> message. During the first part of the <glossary tag="application">application's</glossary> startup process, before this <keyword tag="message box">message</keyword> is sent, the <b>http</b> <glossary tag="keyword">keyword</glossary> is not yet available. This may affect attempts to use this <glossary tag="keyword">keyword</glossary> in <message tag="startup">startup</message>, <message tag="preOpenStack">preOpenStack</message>, <message tag="openStack">openStack</message>, or <message tag="preOpenCard">preOpenCard</message> <message tag="preOpenCard">handlers</message> in the <glossary tag="main stack">main stack</glossary>. Once the <glossary tag="application">application</glossary> has finished starting up, the <command tag="start using">library</command> is available and the <b>http</b> <glossary tag="keyword">keyword</glossary> can be used in any <glossary tag="handler">handler</glossary>.</note></overview>

		<parameters>
		</parameters>

	<value></value>
	<comments></comments>
	</description>
</doc>