LineEnd (HttpRequest property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (match syntax table to syntax template; edits, tags and links)
Line 1: Line 1:
{{Template:HttpRequest:LineEnd subtitle}}
{{Template:HttpRequest:LineEnd subtitle}}
The <var>LineEnd</var> 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 <var>[[Stringlist class|Stringlist]]</var> object to the <var>[[AddField_(HttpRequest_subroutine)|AddField]]</var> method.


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 <var>Stringlist</var> object
to the AddField method.
==Syntax==
==Syntax==
{{Template:HttpRequest:LineEnd syntax}}
{{Template:HttpRequest:LineEnd syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%httpreq</th>
<tr><th>%currentLineEnd</th>
<td>An instantiated <var>HttpRequest</var> object.
<td>The string variable that will be assignment the current value of <var>LineEnd</var>.</td></tr>
</td></tr>
<tr><th>%httpRequest</th>
<tr><th>sequence</th>
<td>A previously defined and instantiated <var>HttpRequest</var> object.</td></tr>
<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').
<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> <var>Enumeration</var> 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>
<tr><th>%curr</th>
<td>The string variable for the assignment of the current value of LineEnd.
</td></tr></table>
</td></tr></table>


==Usage notes==
==Usage notes==
<ul>
<ul>
<li>The <var>LineEnd</var> property must be set '''before''' the <var>AddField</var> call
<li>The <var>LineEnd</var> property must be set '''before''' the <var>AddField</var> call that adds the form data.
that adds the form data.
<li>The <var>LineEnd</var> setting remains in effect unless the property is reset with another assignment.
<li>The <var>LineEnd</var> setting remains in effect
<li>For an example of code that uses the <var>LineEnd</var> property, see [[AddField (HttpRequest subroutine)#Example|this]] <var>AddField</var> example.
unless the property is reset with another assignment.
<li><var>LineEnd</var> is available in <var class="product">[[Sirius Mods]]</var> Version 6.6 and later.
<li>For an example of code that uses the <var>LineEnd</var>
property, see [[AddField (HttpRequest subroutine)#Example|this]] <var>AddField</var> example.
<li>For information about <var>Enumerations</var>, see [[Enumerations|"Enumerations"]].
</ul>
</ul>
==Example==
==Example==
 
<ol>
The <var>LineEnd</var> format is shown in the following fragment:
<li>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></ol>
 
==See also==
==See also==
<ul><li>For more general information and background about using Enumerations, see [[Enumerations|"Enumerations"]].
</ul>
{{Template:HttpRequest:LineEnd footer}}
{{Template:HttpRequest:LineEnd footer}}

Revision as of 09:28, 18 June 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 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').

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.
  • LineEnd is available in Sirius Mods Version 6.6 and later.

Example

  1. 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".