LineEnd (HttpRequest property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 10: Line 10:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%httpreq</th>
<tr><th>%httpreq</th>
<td>An instantiated <var>HTTPRequest</var> object.
<td>An instantiated <var>HttpRequest</var> object.
</td></tr>
</td></tr>
<tr><th>sequence</th>
<tr><th>sequence</th>
<td>Identifies the 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 LineEnd Enumeration values: <dl> <dt>CRLF <dd>Use carriage-return/line-feed (hex value X'0D0A'). This is the default for a newly created <var>HTTPRequest</var> object. <dt>CR <dd>Use only carriage-return (X'0D'). <dt>LF <dd>Use only line-feed (X'0A').
<td>Identifies the 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 LineEnd Enumeration values: <dl> <dt>CRLF <dd>Use carriage-return/line-feed (hex value X'0D0A'). This is the default for a newly created <var>HttpRequest</var> object. <dt>CR <dd>Use only carriage-return (X'0D'). <dt>LF <dd>Use only line-feed (X'0A').
</dl>
</dl>
</td></tr>
</td></tr>
Line 27: Line 27:
unless the property is reset with another assignment.
unless the property is reset with another assignment.
<li>For an example of code that uses the <var>LineEnd</var>
<li>For an example of code that uses the <var>LineEnd</var>
property, see [[AddField (HTTPRequest subroutine)#Example|this]] <var>AddField</var> example.
property, see [[AddField (HttpRequest subroutine)#Example|this]] <var>AddField</var> example.
<li>For information about <var>Enumerations</var>, see [[Enumerations|"Enumerations"]].
<li>For information about <var>Enumerations</var>, see [[Enumerations|"Enumerations"]].
</ul>
</ul>
Line 33: Line 33:


The <var>LineEnd</var> format is shown in the following fragment:
The <var>LineEnd</var> format is shown in the following fragment:
<p class="code"> %HTTPRequest:LineEnd = CRLF
<p class="code"> %HttpRequest:LineEnd = CRLF
  %HTTPRequest:LineEnd = CR
  %HttpRequest:LineEnd = CR
  %HTTPRequest:LineEnd = LF
  %HttpRequest:LineEnd = LF
  %HTTPRequest:AddField( ....
  %HttpRequest:AddField( ....
</p>
</p>
==See also==
==See also==
{{Template:HttpRequest:LineEnd footer}}
{{Template:HttpRequest:LineEnd footer}}

Revision as of 20:17, 16 June 2011

Line-end sequence for POSTed Stringlist data (HttpRequest class)


Added in version 6.6, this 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

%httpreq An instantiated HttpRequest object.
sequence Identifies the 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 values:
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').
%curr The string variable for the assignment of the current value of LineEnd.

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.
  • For information about Enumerations, see "Enumerations".

Example

The LineEnd format is shown in the following fragment:

%HttpRequest:LineEnd = CRLF %HttpRequest:LineEnd = CR %HttpRequest:LineEnd = LF %HttpRequest:AddField( ....

See also