up: HTTP     index Zimbu documentation

CLASS HTTP.Request @public

summary

     

The HTTP request fields.

HTTP.RequestType  $type @public  The type of request.
string  $path @public  The path found in the request, up to any '?'.
string  $params @public  "?arg=val&arg=val" without the '?'.
string  $httpVersion @public  HTTP version from the first line
string  $ip @public  The IP address of the requester if it is an IPv4 address.
string  $ip6 @public  The IP address of the requester if it is an IPv6 address.
dict<string, string>  $headerItems @public  Items found in the header.
 
NEW() @public 
$paramDict() dict<string, string> @public  Get a dictionary with the parameters, the "key=value" that come after a "?" in the URL and are separated with "&".
$ToString() string @public  Return a string with all the information of this request. To be used for debugging.
$getCookie(name) string @public  Return the value of cookie name.
 

members (alphabetically)

     

dict<string, string> $headerItems @public

     

Items found in the header.

string $httpVersion @public

     

HTTP version from the first line

string $ip @public

     

The IP address of the requester if it is an IPv4 address.

In the form 123.123.123.123.

string $ip6 @public

     

The IP address of the requester if it is an IPv6 address.

In the form 1234:1234:1234:1234::.

string $params @public

     

"?arg=val&arg=val" without the '?'.

If there is no ? in the path then NIL.

string $path @public

     

The path found in the request, up to any '?'.

HTTP.RequestType $type @public

     

The type of request.

Usually this is RequestType.get or RequestType.post.

PROC NEW() @public

FUNC $ToString() string @public

     

Return a string with all the information of this request. To be used for debugging.

FUNC $getCookie(string name) string @public

     

Return the value of cookie name.

If the cookie is not present NIL is returned.

FUNC $paramDict() dict<string, string> @public

     

Get a dictionary with the parameters, the "key=value" that come after a "?" in the URL and are separated with "&".

license

      Copyright 2009 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0