AddLongstring (HttpRequest subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
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>string</th>
<td>A longstring variable.
<td>A <var>[[Longstrings|Longstring]]</var> variable.
</td></tr>
</td></tr>
<tr><th>binflag</th>
<tr><th>xlatFlag</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}}

Latest revision as of 16:57, 21 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.
string A Longstring variable.
xlatFlag 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