MultiPartFormEncoding (HttpRequest property): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
Line 5: | Line 5: | ||
that indicates whether Multipart Form encoding | that indicates whether Multipart Form encoding | ||
support is on or off. | support is on or off. | ||
If on (<code>True</code>), an <var> | If on (<code>True</code>), an <var>HttpRequest</var> object can | ||
send file data to a web site | send file data to a web site | ||
from either a <var>Longstring</var> or a <var>Stringlist</var>. | from either a <var>Longstring</var> or a <var>Stringlist</var>. | ||
Line 19: | Line 19: | ||
</td></tr> | </td></tr> | ||
<tr><th>%httpreq</th> | <tr><th>%httpreq</th> | ||
<td>A previously defined and instantiated <var> | <td>A previously defined and instantiated <var>HttpRequest</var> object. | ||
</td></tr> | </td></tr> | ||
<tr><th>newvalue</th> | <tr><th>newvalue</th> | ||
Line 31: | Line 31: | ||
<ol> | <ol> | ||
<li>Set <var>MultiPartFormEncoding</var> to <code>True</code>. | <li>Set <var>MultiPartFormEncoding</var> to <code>True</code>. | ||
<li>Add form data to the HTTP request with the <var>[[AddField ( | <li>Add form data to the HTTP request with the <var>[[AddField (HttpRequest subroutine)|AddField]]</var> | ||
method. | method. | ||
<li>Use the <var>[[Post ( | <li>Use the <var>[[Post (HttpRequest function)|Post]]</var> function | ||
to send the request. | to send the request. | ||
</ol> | </ol> | ||
Line 40: | Line 40: | ||
or the request is cancelled. | or the request is cancelled. | ||
<li>For an example of code that uses the <var>MultiPartFormEncoding</var> | <li>For an example of code that uses the <var>MultiPartFormEncoding</var> | ||
property, see <var>[[AddField ( | property, see <var>[[AddField (HttpRequest subroutine)#Example|this]]</var> <var>AddField</var> example. | ||
<li>For information about Enumerations, see [[Enumerations|"Enumerations"]]. | <li>For information about Enumerations, see [[Enumerations|"Enumerations"]]. | ||
</ul> | </ul> | ||
==See also== | ==See also== | ||
{{Template:HttpRequest:MultiPartFormEncoding footer}} | {{Template:HttpRequest:MultiPartFormEncoding footer}} |
Revision as of 20:17, 16 June 2011
Use Stringlists for data transfer? (HttpRequest class)
This property sets and returns a Boolean enumeration
(True
or False
)
that indicates whether Multipart Form encoding
support is on or off.
If on (True
), an HttpRequest object can
send file data to a web site
from either a Longstring or a Stringlist.
The Post of file data using this encoding support emulates an HTML form that uses enctype="multipart/form-data" and a type="file" input field.
Syntax
%currentBoolean = httpRequest:MultiPartFormEncoding httpRequest:MultiPartFormEncoding = newBoolean
Syntax terms
%curr | The value (True or False ) of %httpreq's MultiPartFormEncoding property.
|
---|---|
%httpreq | A previously defined and instantiated HttpRequest object. |
newvalue | The Boolean enumeration value (True or False ) to assign to %httpreq's MultiPartFormEncoding property.
|
Usage notes
- To enable file-based form uploads:
- MultiPartFormEncoding must be set to True before any AddField statements are issued, or the request is cancelled.
- For an example of code that uses the MultiPartFormEncoding property, see this AddField example.
- For information about Enumerations, see "Enumerations".