LineEnd (HttpRequest property): Difference between revisions
m (→Syntax terms) |
m (→Syntax terms) |
||
Line 11: | Line 11: | ||
<td>A previously defined and instantiated <var>HttpRequest</var> object.</td></tr> | <td>A previously defined and instantiated <var>HttpRequest</var> object.</td></tr> | ||
<tr><th>newLineEnd</th> | <tr><th>newLineEnd</th> | ||
<td>Identifies the new line-end sequence to use for the <var>Stringlist</var> items being copied into the Post data. Each copied <var>Stringlist</var> item has a line-end sequence appended to it. The options you may specify are these <var>LineEnd</var> | <td>Identifies the new line-end sequence to use for the <var>Stringlist</var> items being copied into the Post data. Each copied <var>Stringlist</var> item has a line-end sequence appended to it. The options you may specify are these <var>LineEnd</var> enumeration (see below) values: <var>CRLF</var>, <var>CR</var>, and <var>LF</var>. | ||
</td></tr></table> | </td></tr></table> | ||
<h3>LineEnd enumeration</h3> | <h3>LineEnd enumeration</h3> | ||
The values of this enumeration are the following: | The values of this [[Enumerations|enumeration]] are the following: | ||
<table class="syntaxNested"> | <table class="syntaxNested"> | ||
<tr><th>CRLF </th> | <tr><th>CRLF </th> | ||
Line 24: | Line 24: | ||
<td>Use only line-feed (X'0A'). </td></tr> | <td>Use only line-feed (X'0A'). </td></tr> | ||
</table> | </table> | ||
'''Note:''' As with all enumerations, the <var>ToString</var> method implicitly converts an enumeration value to a character string whose value is the name of the enumeration value. For more information about methods available to all enumerations, see [[Enumerations#Common enumeration methods|"Common enumeration methods"]]. | |||
==Usage notes== | ==Usage notes== |
Revision as of 21:10, 16 August 2011
Line-end sequence for POSTed Stringlist data (HttpRequest class)
The LineEnd settable property lets you select which of three line-end sequences to use when you add a file to form Post data by passing a Stringlist object to the AddField method.
Syntax
%currentLineEnd = httpRequest:LineEnd httpRequest:LineEnd = newLineEnd
Syntax terms
%currentLineEnd | The string variable that will be assignment the current value of LineEnd. |
---|---|
httpRequest | A previously defined and instantiated HttpRequest object. |
newLineEnd | Identifies the new line-end sequence to use for the Stringlist items being copied into the Post data. Each copied Stringlist item has a line-end sequence appended to it. The options you may specify are these LineEnd enumeration (see below) values: CRLF, CR, and LF. |
LineEnd enumeration
The values of this enumeration are the following:
CRLF | Use carriage-return/line-feed (hex value X'0D0A'). This is the default for a newly created HttpRequest object. |
---|---|
CR | Use only carriage-return (X'0D'). |
LF | Use only line-feed (X'0A'). |
Note: As with all enumerations, the ToString method implicitly converts an enumeration value to a character string whose value is the name of the enumeration value. For more information about methods available to all enumerations, see "Common enumeration methods".
Usage notes
- The LineEnd property must be set before the AddField call that adds the form data.
- The LineEnd setting remains in effect unless the property is reset with another assignment.
- For an example of code that uses the LineEnd property, see this AddField example.
Example
The LineEnd format is shown in the following fragment:
%HttpRequest:LineEnd = CRLF %HttpRequest:LineEnd = CR %HttpRequest:LineEnd = LF %HttpRequest:AddField( ....
See also
- For more general information and background about using Enumerations, see "Enumerations".