Protocol (HttpRequest property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (match syntax table to syntax template; edits and tags)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:HttpRequest:Protocol subtitle}}
{{Template:HttpRequest:Protocol subtitle}}
The <var>Protocol</var> property sets or returns the TCP/IP protocol for the HTTP request.  The protocols supported are <code>http</code> (standard web protocol) and <code>https</code> (Secure Sockets Layer, or, SSL).
If left unset, it defaults to <code>http</code>.


This property sets and returns the TCP/IP protocol for the HTTP request.
The protocols supported
are <code>http</code> (standard web protocol) and <code>https</code>
(Secure Sockets Layer, or, SSL).
If left unset, it defaults to <code>http</code>.
==Syntax==
==Syntax==
{{Template:HttpRequest:Protocol syntax}}
{{Template:HttpRequest:Protocol syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%httpreq</th>
<tr><th>%currentString</th>
<td>A previously defined and instantiated <var>HttpRequest</var> object.
<td>A string or [[Longstrings|Longstring]] variable for the assignment of the current value of <var>Protocol</var>.</td></tr>
</td></tr>
<tr><th>httpRequest</th>
<tr><th>protocolval</th>
<td>A previously defined and instantiated <var>HttpRequest</var> object.</td></tr>
<td>A string expression that identifies the protocol to use. It must have a value of <code>http</code> or <code>https</code>. It is case insensitive. If the value is not <code>http</code> or <code>https</code>, the request is cancelled.
<tr><th>newString</th>
</td></tr>
<td>A string expression that identifies the protocol to use. It must have a value of <code>http</code> or <code>https</code>. It is case insensitive. If the value is not <code>http</code> or <code>https</code>, the request is cancelled.</td></tr>
<tr><th>%curr</th>
</table>
<td>A string or longstring variable for the assignment of the current value of Protocol.


</td></tr></table>
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>You must not set a <var>Protocol</var> value that conflicts with the protocol
<li>You must not set a <var>Protocol</var> value that conflicts with the protocol specified on the <var>[[JANUS CLSOCK]]</var> port definition your HTTP request will reference. For example, to successfully use <code>https</code> as the <var>Protocol</var> value, the <var class="product">Janus</var> port definition must specify both the <var>[[SSL]]</var> and <var>[[SSLOPT]]</var> parameters.
specified on the <var>[[JANUS CLSOCK]]</var> port definition your HTTP request will reference.
<li>Setting the TCP/IP protocol to <code>https</code> automatically sets the <var>[[Port (HttpRequest property)|Port]]</var> property to the standard SSL port (443). Setting the protocol to <code>http</code>
For example, to successfully use <code>https</code> as the <var>Protocol</var> value,
the <var class="product">Janus</var> port definition must specify both the <var>[[SSL]]</var>
and <var>[[SSLOPT]]</var> parameters.
<li>Setting the TCP/IP protocol to <code>https</code> automatically
sets the <var>[[Port (HttpRequest property)|Port]]</var> property to the
standard SSL port (443).
Setting the protocol to <code>http</code>
automatically sets <var>Port</var> to the standard HTTP port (80).
automatically sets <var>Port</var> to the standard HTTP port (80).
</ul>
</ul>
==See also==
==See also==
{{Template:HttpRequest:Protocol footer}}
{{Template:HttpRequest:Protocol footer}}

Latest revision as of 04:15, 19 June 2011

HTTP request protocol (HttpRequest class)

The Protocol property sets or returns the TCP/IP protocol for the HTTP request. The protocols supported are http (standard web protocol) and https (Secure Sockets Layer, or, SSL). If left unset, it defaults to http.

Syntax

%currentString = httpRequest:Protocol httpRequest:Protocol = newString

Syntax terms

%currentString A string or Longstring variable for the assignment of the current value of Protocol.
httpRequest A previously defined and instantiated HttpRequest object.
newString A string expression that identifies the protocol to use. It must have a value of http or https. It is case insensitive. If the value is not http or https, the request is cancelled.

Usage notes

  • You must not set a Protocol value that conflicts with the protocol specified on the JANUS CLSOCK port definition your HTTP request will reference. For example, to successfully use https as the Protocol value, the Janus port definition must specify both the SSL and SSLOPT parameters.
  • Setting the TCP/IP protocol to https automatically sets the Port property to the standard SSL port (443). Setting the protocol to http automatically sets Port to the standard HTTP port (80).

See also