AddLongstring (HttpRequest subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (edits, tags and links)
Line 1: Line 1:
{{Template:HttpRequest:AddLongString subtitle}}
{{Template:HttpRequest:AddLongString subtitle}}
The <var>AddLongString</var> subroutine adds the contents of a <var>[[Longstrings|Longstring]]</var> to the HTTP Post data that is subsequently sent on a [[Post (HttpRequest function)|Post]] method invocation.


This subroutine adds the contents of a <var>[[Longstrings|Longstring]]</var>
The contents of the passed <var>Longstring</var> become the post data of the request being built.  Invoking this method erases any post data previously added by <var>[[AddXml (HttpRequest subroutine)|AddXml]]</var>
to the HTTP Post data that is subsequently sent on a [[Post (HttpRequest function)|Post]]
or <var>AddLongString</var> method calls.  By default, the data is converted from EBCDIC to ASCII; however, this can be turned off.
method invocation.


The contents of the passed <var>Longstring</var> become the post data of the request
being built.
Invoking this method erases any post data previously
added by <var>[[AddXml (HttpRequest subroutine)|AddXml]]</var>
or <var>AddLongString</var> method calls.
By default, the data is converted from
EBCDIC to ASCII; however, this can be turned off.
==Syntax==
==Syntax==
{{Template:HttpRequest:AddLongString syntax}}
{{Template:HttpRequest:AddLongString syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%httpreq</th>
<tr><th>httpRequest</th>
<td>A previously defined and instantiated <var>HttpRequest</var> object.
<td>A previously defined and instantiated <var>HttpRequest</var> object.
</td></tr>
</td></tr>
<tr><th>%ls</th>
<tr><th>ls</th>
<td>A longstring variable.
<td>A <var>longstring</var> variable.
</td></tr>
</td></tr>
<tr><th>binflag</th>
<tr><th>binflag</th>
<td>A numeric expression that, if nonzero, indicates binary data. Setting this option overrides the default behaviour of translating EBCDIC to ASCII.
<td>A numeric expression that, if nonzero, indicates binary data. Setting this option overrides the default behaviour of translating EBCDIC to ASCII.
</td></tr></table>


</td></tr></table>
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>Unlike the <var>[[AddField (HttpRequest subroutine)|AddField]]</var> method
<li>Unlike the <var>[[AddField (HttpRequest subroutine)|AddField]]</var> method, <var>AddLongString</var> has no effect on the request content type.
for example, <var>AddLongString</var> has no effect on the request content type.
</ul>
</ul>
==See also==
==See also==
{{Template:HttpRequest:AddLongString footer}}
{{Template:HttpRequest:AddLongString footer}}

Revision as of 06:52, 18 June 2011

Add a longstring to POST data for this request (HttpRequest class)

The AddLongString subroutine adds the contents of a Longstring to the HTTP Post data that is subsequently sent on a Post method invocation.

The contents of the passed Longstring become the post data of the request being built. Invoking this method erases any post data previously added by AddXml or AddLongString method calls. By default, the data is converted from EBCDIC to ASCII; however, this can be turned off.

Syntax

httpRequest:AddLongString( string, [xlatFlag])

Syntax terms

httpRequest A previously defined and instantiated HttpRequest object.
ls A longstring variable.
binflag A numeric expression that, if nonzero, indicates binary data. Setting this option overrides the default behaviour of translating EBCDIC to ASCII.

Usage notes

  • Unlike the AddField method, AddLongString has no effect on the request content type.

See also