Difference between revisions of "Unit HTTP"

From Ultibo.org
Jump to: navigation, search
 
(19 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ultibo HTTP Interface unit'''
  
 
=== Constants ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP specific constants''' <code> HTTP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_TAB = Chr(9);</code>
 +
| Tab
 +
|-
 +
| <code>HTTP_SPACE = Chr(32);</code>
 +
| Space
 +
|-
 +
| <code>HTTP_DASH = '-';</code>
 +
| -
 +
|-
 +
| <code>HTTP_COLON = ':';</code>
 +
| :
 +
|-
 +
| <code>HTTP_LINE_END = Chr(13) + Chr(10);</code>
 +
| CR LF
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HTTP_PORT_SEPARATOR = ':';</code>
 +
| :
 +
|-
 +
| <code>HTTP_PATH_SEPARATOR = '/';</code>
 +
| /
 +
|-
 +
| <code>HTTP_QUERY_SEPARATOR = '?';</code>
 +
| ?
 +
|-
 +
| <code>HTTP_PARAM_SEPARATOR = '=';</code>
 +
| =
 +
|-
 +
| <code>HTTP_PARAM_DELIMITER = '&';</code>
 +
| &
 +
|-
 +
| <code>HTTP_HEADER_SEPARATOR = ':';</code>
 +
| :
 +
|-
 +
| <code>HTTP_BOOKMARK_SEPARATOR = '#';</code>
 +
| #
 +
|-
 +
| <code>HTTP_PROTOCOL_SEPARATOR = '://';</code>
 +
| ://
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HTTP_BUFFER_SIZE = SIZE_2K;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP date''' <code> HTTP_DATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_DATE_FORMAT_RFC1123 = 'ddd, dd mmm yyyy hh:nn:ss "GMT"';</code>
 +
| RFC 822, updated by RFC 1123
 +
|-
 +
| <code>HTTP_DATE_FORMAT_RFC850 = 'dddd, dd-mmm-yy hh:nn:ss "GMT"';</code>
 +
| RFC 850, obsoleted by RFC 1036
 +
|-
 +
| <code>HTTP_DATE_FORMAT_ANSIC = 'ddd mmm d hh:nn:ss yyyy';</code>
 +
| ANSI C's asctime() format
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HTTP_DATE_FORMAT = HTTP_DATE_FORMAT_RFC1123;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP client''' <code> HTTP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_USERAGENT_STRING = 'Mozilla/5.0 (compatible; Ultibo/' + ULTIBO_RELEASE_VERSION + ')';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_TIMEOUT = 60000;</code>
 +
| 60 seconds
 +
|-
 +
| <code>HTTP_KEEPALIVE_TIMEOUT = 300;</code>
 +
| 300 seconds (5 minutes)
 +
|-
 +
| <code>HTTP_MAX_REDIRECTS = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_PROXY_PORT_DEFAULT = 8080;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP server''' <code> HTTP_SERVER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_SERVER_STRING = 'Ultibo/' + ULTIBO_RELEASE_VERSION;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP protocol''' <code> HTTP_PROTOCOL_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_PROTOCOL_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_PROTOCOL_HTTP = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_PROTOCOL_HTTPS = 2;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HTTP_PROTOCOL_STRING_HTTP = 'http';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_PROTOCOL_STRING_HTTPS = 'https';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP method''' <code> HTTP_METHOD_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_METHOD_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_METHOD_OPTIONS = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_GET = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_HEAD = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_POST = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_PUT = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_DELETE = 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_TRACE = 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_CONNECT = 8;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HTTP_METHOD_STRING_OPTIONS = 'OPTIONS';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_STRING_GET = 'GET';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_STRING_HEAD = 'HEAD';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_STRING_POST = 'POST';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_STRING_PUT = 'PUT';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_STRING_DELETE = 'DELETE';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_STRING_TRACE = 'TRACE';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_METHOD_STRING_CONNECT = 'CONNECT';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP version''' <code> HTTP_VERSION_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_VERSION_00 = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_VERSION_10 = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_VERSION_11 = 2;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HTTP_VERSION = HTTP_VERSION_11;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HTTP_VERSION_STRING_10 = 'HTTP/1.0';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_VERSION_STRING_11 = 'HTTP/1.1';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP encoding''' <code> HTTP_ENCODING_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_ENCODING_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_IDENTITY = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_CHUNKED = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_GZIP = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_COMPRESS = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_DEFLATE = 5;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_STRING_IDENTITY = 'identity';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_STRING_CHUNKED = 'chunked';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_STRING_GZIP = 'gzip';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_STRING_COMPRESS = 'compress';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENCODING_STRING_DEFLATE = 'deflate';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP general header''' <code> HTTP_GENERAL_HEADER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_GENERAL_HEADER_CACHE_CONTROL = 'Cache-Control';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_GENERAL_HEADER_CONNECTION = 'Connection';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_GENERAL_HEADER_DATE = 'Date';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_GENERAL_HEADER_PRAGMA = 'Pragma';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_GENERAL_HEADER_TRAILER = 'Trailer';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_GENERAL_HEADER_TRANSFER_ENCODING = 'Transfer-Encoding';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_GENERAL_HEADER_UPGRADE = 'Upgrade';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_GENERAL_HEADER_VIA = 'Via';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_GENERAL_HEADER_WARNING = 'Warning';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP request header''' <code> HTTP_REQUEST_HEADER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_ACCEPT = 'Accept';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_ACCEPT_CHARSET = 'Accept-Charset';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_ACCEPT_ENCODING = 'Accept-Encoding';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_ACCEPT_LANGUAGE = 'Accept-Language';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_AUTHORIZATION = 'Authorization';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_EXPECT = 'Expect';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_FROM = 'From';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_HOST = 'Host';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_IF_MATCH = 'If-Match';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_IF_MODIFIED_SINCE = 'If-Modified-Since';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_IF_NONE_MATCH = 'If-None-Match';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_IF_RANGE = 'If-Range'</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_IF_UNMODIFIED_SINCE = 'If-Unmodified-Since';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_MAX_FORWARDS = 'Max-Forwards';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_PROXY_AUTH = 'Proxy-Authorization';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_RANGE = 'Range';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_REFERER = 'Referer';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_TE = 'TE';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_HEADER_USER_AGENT = 'User-Agent';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP response header''' <code> HTTP_RESPONSE_HEADER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_RESPONSE_HEADER_ACCEPT_RANGES = 'Accept-Ranges';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_RESPONSE_HEADER_AGE = 'Age';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_RESPONSE_HEADER_ETAG = 'ETag';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_RESPONSE_HEADER_LOCATION = 'Location';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_RESPONSE_HEADER_PROXY_AUTH = 'Proxy-Authenticate';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_RESPONSE_HEADER_RETRY_AFTER = 'Retry-After';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_RESPONSE_HEADER_SERVER = 'Server';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_RESPONSE_HEADER_VARY = 'Vary';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_RESPONSE_HEADER_WWW_AUTHENTICATE = 'WWW-Authenticate';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP entity header''' <code> HTTP_ENTITY_HEADER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_ALLOW = 'Allow';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_CONTENT_ENCODING = 'Content-Encoding';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_CONTENT_LENGTH = 'Content-Length';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_CONTENT_LOCATION = 'Content-Location';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_CONTENT_MD5 = 'Content-MD5';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_CONTENT_RANGE = 'Content-Range';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_CONTENT_TYPE = 'Content-Type';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_CONTENT_DISPOSITION = 'Content-Disposition';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_EXPIRES = 'Expires';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_ENTITY_HEADER_LAST_MODIFIED = 'Last-Modified';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP status''' <code> HTTP_STATUS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_STATUS_NONE = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_STATUS_CONTINUE = 100;</code>
 +
| Continue
 +
|-
 +
| <code>HTTP_STATUS_SWITCH_PROTOCOL = 101;</code>
 +
| Switching Protocols
 +
|-
 +
| <code>HTTP_STATUS_OK = 200;</code>
 +
| OK
 +
|-
 +
| <code>HTTP_STATUS_CREATED  = 201;</code>
 +
| Created
 +
|-
 +
| <code>HTTP_STATUS_ACCEPTED = 202;</code>
 +
| Accepted
 +
|-
 +
| <code>HTTP_STATUS_NON_AUTHORITATIVE = 203;</code>
 +
| Non-Authoritative Information
 +
|-
 +
| <code>HTTP_STATUS_NO_CONTENT = 204;</code>
 +
| No Content
 +
|-
 +
| <code>HTTP_STATUS_RESET_CONTENT = 205;</code>
 +
| Reset Content
 +
|-
 +
| <code>HTTP_STATUS_PARTIAL_CONTENT = 206;</code>
 +
| Partial Content
 +
|-
 +
| <code>HTTP_STATUS_MULTIPLE_CHOICES = 300;</code>
 +
| Multiple Choices
 +
|-
 +
| <code>HTTP_STATUS_MOVED_PERMANENT = 301;</code>
 +
| Moved Permanently
 +
|-
 +
| <code>HTTP_STATUS_FOUND = 302;</code>
 +
| Found
 +
|-
 +
| <code>HTTP_STATUS_SEE_OTHER = 303;</code>
 +
| See Other
 +
|-
 +
| <code>HTTP_STATUS_NOT_MODIFIED = 304;</code>
 +
| Not Modified
 +
|-
 +
| <code>HTTP_STATUS_USE_PROXY = 305;</code>
 +
| Use Proxy
 +
|-
 +
| <code>HTTP_STATUS_TEMPORARY_REDIRECT = 307;</code>
 +
| Temporary Redirect
 +
|-
 +
| <code>HTTP_STATUS_BAD_REQUEST = 400;</code>
 +
| Bad Request
 +
|-
 +
| <code>HTTP_STATUS_UNAUTHORIZED = 401;</code>
 +
| Unauthorized
 +
|-
 +
| <code>HTTP_STATUS_PAYMENT_REQUIRED = 402;</code>
 +
| Payment Required
 +
|-
 +
| <code>HTTP_STATUS_FORBIDDEN = 403;</code>
 +
| Forbidden
 +
|-
 +
| <code>HTTP_STATUS_NOT_FOUND = 404;</code>
 +
| Not Found
 +
|-
 +
| <code>HTTP_STATUS_METHOD_NOT_ALLOWED = 405;</code>
 +
| Method Not Allowed
 +
|-
 +
| <code>HTTP_STATUS_NOT_ACCEPTABLE = 406;</code>
 +
| Not Acceptable
 +
|-
 +
| <code>HTTP_STATUS_PROXY_AUTH_REQUIRED = 407;</code>
 +
| Proxy Authentication Required
 +
|-
 +
| <code>HTTP_STATUS_REQUEST_TIMEOUT = 408;</code>
 +
| Request Time-out
 +
|-
 +
| <code>HTTP_STATUS_CONFLICT = 409;</code>
 +
| Conflict
 +
|-
 +
| <code>HTTP_STATUS_GONE = 410;</code>
 +
| Gone
 +
|-
 +
| <code>HTTP_STATUS_LENGTH_REQUIRED = 411;</code>
 +
| Length Required
 +
|-
 +
| <code>HTTP_STATUS_PRECONDITION_FAILED = 412;</code>
 +
| Precondition Failed
 +
|-
 +
| <code>HTTP_STATUS_ENTITY_TOO_LARGE = 413;</code>
 +
| Request Entity Too Large
 +
|-
 +
| <code>HTTP_STATUS_URI_TOO_LARGE = 414;</code>
 +
| Request-URI Too Large
 +
|-
 +
| <code>HTTP_STATUS_UNSUPPORTED_MEDIA = 415;</code>
 +
| Unsupported Media Type
 +
|-
 +
| <code>HTTP_STATUS_RANGE_NOT_SATISFIED = 416;</code>
 +
| Requested range not satisfiable
 +
|-
 +
| <code>HTTP_STATUS_EXPECTATION_FAILED = 417;</code>
 +
| Expectation Failed
 +
|-
 +
| <code>HTTP_STATUS_INTERNAL_SERVER_ERROR = 500;</code>
 +
| Internal Server Error
 +
|-
 +
| <code>HTTP_STATUS_NOT_IMPLEMENTED = 501;</code>
 +
| Not Implemented
 +
|-
 +
| <code>HTTP_STATUS_BAD_GATEWAY = 502;</code>
 +
| Bad Gateway
 +
|-
 +
| <code>HTTP_STATUS_SERICE_UNAVAILABLE = 503;</code>
 +
| Service Unavailable
 +
|-
 +
| <code>HTTP_STATUS_GATEWAY_TIMEOUT = 504;</code>
 +
| Gateway Time-out
 +
|-
 +
| <code>HTTP_STATUS_VERSION_NOT_SUPPORTED = 505;</code>
 +
| HTTP Version not supported
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>HTTP_MIN_STATUS = 100;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_MAX_STATUS = 599;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP reason''' <code> HTTP_REASON_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_REASON_100 = 'Continue';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_REASON_101 = 'Switching Protocols';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_200 = 'OK';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_201 = 'Created';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_202 = 'Accepted';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_203 = 'Non-Authoritative Information';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_204 = 'No Content';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_205 = 'Reset Content';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_206 = 'Partial Content';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_300 = 'Multiple Choices';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_301 = 'Moved Permanently';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_302 = 'Found';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_303 = 'See Other';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_304 = 'Not Modified';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_305 = 'Use Proxy';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_307 = 'Temporary Redirect';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_400 = 'Bad Request';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_401 = 'Unauthorized';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_402 = 'Payment Required';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_403 = 'Forbidden';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_404 = 'Not Found';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_405 = 'Method Not Allowed';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_406 = 'Not Acceptable';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_407 = 'Proxy Authentication Required';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_408 = 'Request Time-out';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_409 = 'Conflict';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_410 = 'Gone';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_411 = 'Length Required';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_412 = 'Precondition Failed';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_413 = 'Request Entity Too Large';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_414 = 'Request-URI Too Large';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_415 = 'Unsupported Media Type';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_416 = 'Requested range not satisfiable';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_417 = 'Expectation Failed';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_500 = 'Internal Server Error';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_501 = 'Not Implemented';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_502 = 'Bad Gateway';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_503 = 'Service Unavailable';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_504 = 'Gateway Time-out';</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REASON_505 = 'HTTP Version not supported ';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP content type''' <code> HTTP_CONTENT_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_CONTENT_TEXT_HTML = 'text/html';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP cache control''' <code> HTTP_CACHE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_CACHE_NO_CACHE = 'no-cache';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP connection''' <code> HTTP_CONNECTION_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_CONNECTION_CLOSE = 'close';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_CONNECTION_KEEPALIVE = 'keep-alive';</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP request flag''' <code> HTTP_REQUEST_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_REQUEST_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_REQUEST_FLAG_CONTENT_RECEIVED = $00000001;</code>
 +
| Server
 +
|-
 +
| <code>HTTP_REQUEST_FLAG_LINE_SENT = $00000002;</code>
 +
| Client
 +
|-
 +
| <code>HTTP_REQUEST_FLAG_HEADERS_SENT = $00000004;</code>
 +
| Client
 +
|-
 +
| <code>HTTP_REQUEST_FLAG_CONTENT_SENT = $00000008;</code>
 +
| Client
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP response flag''' <code> HTTP_RESPONSE_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_RESPONSE_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_RESPONSE_FLAG_STATUS_SENT = $00000001;</code>
 +
| Server
 +
|-
 +
| <code>HTTP_RESPONSE_FLAG_HEADERS_SENT = $00000002;</code>
 +
| Server
 +
|-
 +
| <code>HTTP_RESPONSE_FLAG_CONTENT_SENT = $00000004;</code>
 +
| Server
 +
|-
 +
| <code>HTTP_RESPONSE_FLAG_CONNECTION_CLOSE = $00000008;</code>
 +
| Server/Client
 +
|-
 +
| <code>HTTP_RESPONSE_FLAG_NO_CACHE = $00000010;</code>
 +
| Server/Client
 +
|-
 +
| <code>HTTP_RESPONSE_FLAG_CONTENT_RECEIVED = $00000020;</code>
 +
| Client
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP client state''' <code> HTTP_CLIENT_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_CLIENT_STATE_NONE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_CLIENT_STATE_REQUEST = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_CLIENT_STATE_REDIRECT = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_CLIENT_STATE_SUCCESS = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_CLIENT_STATE_FAILURE = 4;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP host flag''' <code> HTTP_HOST_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_HOST_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_HOST_FLAG_DEFAULT = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_HOST_FLAG_DOMAIN = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP CGI flag''' <code> HTTP_CGI_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_CGI_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_CGI_FLAG_FOLDER = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_CGI_FLAG_SUBTREE = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_CGI_FLAG_EXTENSION = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP error flag''' <code> HTTP_ERROR_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_ERROR_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_ERROR_FLAG_DEFAULT = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br /> 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP module flag''' <code> HTTP_MODULE_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_MODULE_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP document flag''' <code> HTTP_DOCUMENT_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_DOCUMENT_FLAG_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HTTP_DOCUMENT_FLAG_DEFAULT = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_DOCUMENT_FLAG_FOLDER = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_DOCUMENT_FLAG_SUBTREE = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HTTP_DOCUMENT_FLAG_EXTENSION = $00000008;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP mime type''' <code> HTTP_MIME_TYPE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|See: Apache mime.types file
 +
|-
 +
| <code>HTTP_MIME_TYPE_MAX = 29;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|<code>HTTP_MIME_TYPES:array[0..HTTP_MIME_TYPE_MAX,0..1] of String = (</code>
 +
|-
 +
| <code>('avi','video/x-msvideo'),</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>('bat','application/x-msdownload'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('bmp','image/bmp'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('com','application/x-msdownload'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('conf','text/plain'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('css','text/css'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('dll','application/x-msdownload'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('doc','application/msword'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('dot','application/msword'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('exe','application/x-msdownload'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('gif','image/gif'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('html','text/html'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('htm','text/html'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('iso','application/octet-stream'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('jpeg','image/jpeg'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('js','application/javascript'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('jpg','image/jpeg'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('pdf','application/pdf'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('png','image/png'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('txt','text/plain'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('text','text/plain'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('log','text/plain'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('mov','video/quicktime'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('mp3','audio/mpeg'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('mp4','video/mp4'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('msi','application/x-msdownload'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('qt','video/quicktime'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('tar','application/x-tar'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('wmv','video/x-ms-wmv'),</code>
 +
| &nbsp;
 +
|-
 +
| <code>('zip','application/zip') );</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|<code>HTTP_MIME_TYPE_DEFAULT = 'application/octet-stream';</code>
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''HTTP logging''' <code> HTTP_LOG_LEVEL_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HTTP_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code>
 +
| HTTP debugging messages
 +
|-
 +
| <code>HTTP_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code>
 +
| HTTP informational messages
 +
|-
 +
| <code>HTTP_LOG_LEVEL_WARN = LOG_LEVEL_WARN;</code>
 +
| HTTP warning messages
 +
|-
 +
| <code>HTTP_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code>
 +
| HTTP error messages
 +
|-
 +
| <code>HTTP_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code>
 +
| No HTTP messages
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
 
 +
'''HTTP reserved chars'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>THTTPReservedChars = set of AnsiChar;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''HTTP redirect event'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>THTTPRedirectEvent = function(AClient:THTTPClient; const AURL:String; var ALocation:String):Boolean of Object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''HTTP password event'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>THTTPPasswordEvent = function(AClient:THTTPClient; var AUsername,APassword:String):Boolean of Object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''HTTP host event'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>THTTPHostEvent = function(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean of Object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''HTTP error event'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>THTTPErrorEvent = function(AHost:THTTPHost; AError:THTTPError; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean of Object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''HTTP module event'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>THTTPModuleEvent = function(AHost:THTTPHost; AModule:THTTPModule; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean of Object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''HTTP document event'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>THTTPDocumentEvent = function(AHost:THTTPHost; ADocument:THTTPDocument; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean of Object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
 +
 
 +
=== Class definitions ===
 +
----
 +
 
 +
 
 +
'''HTTP helper classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPBuffer|<code>THTTPBuffer = class(TObject)</code>]]
 +
|-
 +
|}
 +
 
 +
'''HTTP common classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPParam|<code>THTTPParam = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPParams|<code>THTTPParams = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPHeader|<code>THTTPHeader = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPHeaders|<code>THTTPHeaders = class(TObject)</code>]]
 +
|-
 +
|}
 +
 
 +
'''HTTP client classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPClientRequest|<code>THTTPClientRequest = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPClientResponse|<code>THTTPClientResponse = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPClient|<code>THTTPClient = class(TWinsock2TCPClient)</code>]]
 +
|-
 +
|}
 +
 
 +
'''HTTP server classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPServerRequest|<code>THTTPServerRequest = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPServerResponse|<code>THTTPServerResponse = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPHost|<code>THTTPHost = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPError|<code>THTTPError = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPAlias|<code>THTTPAlias = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPModule|<code>THTTPModule = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPDocument|<code>THTTPDocument = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPMimeType|<code>THTTPMimeType = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPRedirect|<code>THTTPRedirect = class(THTTPDocument)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPFolder|<code>THTTPFolder = class(THTTPDocument)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPFile|<code>THTTPFile = class(THTTPDocument)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[THTTPListener|<code>THTTPListener = class(TWinsock2TCPListener)</code>]]
 +
|-
 +
|}
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
 
 +
'''HTTP logging'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>HTTP_DEFAULT_LOG_LEVEL:LongWord = HTTP_LOG_LEVEL_DEBUG;</code>
 +
| style="width: 40%;"|Minimum level for HTTP messages. Only messages with level greater than or equal to this will be printed.
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>HTTP_LOG_ENABLED:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Function declarations ===
 
=== Function declarations ===
Line 34: Line 1,269:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 49: Line 1,284:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 56: Line 1,291:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function HTTPDecode(const AValue:String):String;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function HTTPDecode(const AValue:String; AQuery:Boolean = False):String;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 73: Line 1,308:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 85: Line 1,320:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 97: Line 1,332:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 109: Line 1,344:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 121: Line 1,356:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 133: Line 1,368:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 145: Line 1,380:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 157: Line 1,392:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 169: Line 1,404:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 181: Line 1,416:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 193: Line 1,428:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 205: Line 1,440:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 217: Line 1,452:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 229: Line 1,464:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 241: Line 1,476:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 253: Line 1,488:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 265: Line 1,500:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 277: Line 1,512:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 289: Line 1,524:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 301: Line 1,536:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 313: Line 1,548:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 325: Line 1,560:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 337: Line 1,572:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 349: Line 1,584:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 361: Line 1,596:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 373: Line 1,608:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 385: Line 1,620:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 397: Line 1,632:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 409: Line 1,644:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 421: Line 1,656:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 433: Line 1,668:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 445: Line 1,680:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 457: Line 1,692:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure HTTPLogInfo(const AText:String); inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None documented
 
|-
 
|-
 
|}
 
|}
Line 464: Line 1,711:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">procedure HTTPLogInfo(const AText:String);</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure HTTPLogWarn(const AText:String); inline;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 476: Line 1,723:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">procedure HTTPLogError(const AText:String);</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure HTTPLogError(const AText:String); inline;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}
Line 488: Line 1,735:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">procedure HTTPLogDebug(const AText:String);</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure HTTPLogDebug(const AText:String); inline;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| To be documented
+
| None documented
 
|-
 
|-
 
|}
 
|}

Latest revision as of 04:22, 14 October 2022

Return to Unit Reference


Description


Ultibo HTTP Interface unit

Constants



[Expand]
HTTP specific constants HTTP_*


[Expand]
HTTP date HTTP_DATE_*


[Expand]
HTTP client HTTP_*


[Expand]
HTTP server HTTP_SERVER_*


[Expand]
HTTP protocol HTTP_PROTOCOL_*


[Expand]
HTTP method HTTP_METHOD_*


[Expand]
HTTP version HTTP_VERSION_*


[Expand]
HTTP encoding HTTP_ENCODING_*


[Expand]
HTTP general header HTTP_GENERAL_HEADER_*


[Expand]
HTTP request header HTTP_REQUEST_HEADER_*


[Expand]
HTTP response header HTTP_RESPONSE_HEADER_*


[Expand]
HTTP entity header HTTP_ENTITY_HEADER_*


[Expand]
HTTP status HTTP_STATUS_*


[Expand]
HTTP reason HTTP_REASON_*


[Expand]
HTTP content type HTTP_CONTENT_*


[Expand]
HTTP cache control HTTP_CACHE_*


[Expand]
HTTP connection HTTP_CONNECTION_*


[Expand]
HTTP request flag HTTP_REQUEST_FLAG_*


[Expand]
HTTP response flag HTTP_RESPONSE_FLAG_*


[Expand]
HTTP client state HTTP_CLIENT_STATE_*


[Expand]
HTTP host flag HTTP_HOST_FLAG_*


[Expand]
HTTP CGI flag HTTP_CGI_FLAG_*


[Expand]
HTTP error flag HTTP_ERROR_FLAG_*


[Expand]
HTTP module flag HTTP_MODULE_FLAG_*


[Expand]
HTTP document flag HTTP_DOCUMENT_FLAG_*


[Expand]
HTTP mime type HTTP_MIME_TYPE_*


[Expand]
HTTP logging HTTP_LOG_LEVEL_*


Type definitions



HTTP reserved chars

THTTPReservedChars = set of AnsiChar;

HTTP redirect event

THTTPRedirectEvent = function(AClient:THTTPClient; const AURL:String; var ALocation:String):Boolean of Object;

HTTP password event

THTTPPasswordEvent = function(AClient:THTTPClient; var AUsername,APassword:String):Boolean of Object;

HTTP host event

THTTPHostEvent = function(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean of Object;

HTTP error event

THTTPErrorEvent = function(AHost:THTTPHost; AError:THTTPError; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean of Object;

HTTP module event

THTTPModuleEvent = function(AHost:THTTPHost; AModule:THTTPModule; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean of Object;

HTTP document event

THTTPDocumentEvent = function(AHost:THTTPHost; ADocument:THTTPDocument; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean of Object;


Class definitions



HTTP helper classes

THTTPBuffer = class(TObject)

HTTP common classes

THTTPParam = class(TListObject)
THTTPParams = class(TObject)
THTTPHeader = class(TListObject)
THTTPHeaders = class(TObject)

HTTP client classes

THTTPClientRequest = class(TObject)
THTTPClientResponse = class(TObject)
THTTPClient = class(TWinsock2TCPClient)

HTTP server classes

THTTPServerRequest = class(TObject)
THTTPServerResponse = class(TObject)
THTTPHost = class(TListObject)
THTTPError = class(TListObject)
THTTPAlias = class(TListObject)
THTTPModule = class(TListObject)
THTTPDocument = class(TListObject)
THTTPMimeType = class(TListObject)
THTTPRedirect = class(THTTPDocument)
THTTPFolder = class(THTTPDocument)
THTTPFile = class(THTTPDocument)
THTTPListener = class(TWinsock2TCPListener)


Public variables



HTTP logging

HTTP_DEFAULT_LOG_LEVEL:LongWord = HTTP_LOG_LEVEL_DEBUG; Minimum level for HTTP messages. Only messages with level greater than or equal to this will be printed.
HTTP_LOG_ENABLED:Boolean;


Function declarations



Initialization functions

[Expand]
procedure HTTPInit;
Description: To be documented


HTTP helper functions

[Expand]
function HTTPEncode(const AValue:String; AReserved:THTTPReservedChars):String;
Description: To be documented


[Expand]
function HTTPDecode(const AValue:String; AQuery:Boolean = False):String;
Description: To be documented


[Expand]
function HTTPParseURI(const AURI:String; var AProtocol,AHost,APort,APath,AQuery:String):Boolean;
Description: To be documented


[Expand]
function HTTPBuildURI(const AProtocol,AHost,APort,APath,AQuery:String; var AURI:String):Boolean;
Description: To be documented


[Expand]
function HTTPParseHost(const AHost:String; var AName,APort:String):Boolean;
Description: To be documented


[Expand]
function HTTPBuildHost(const AName,APort:String; var AHost:String):Boolean;
Description: To be documented


[Expand]
function HTTPParseParam(const AParam:String; var AName,AValue:String):Boolean;
Description: To be documented


[Expand]
function HTTPBuildParam(const AName,AValue:String; var AParam:String):Boolean;
Description: To be documented


[Expand]
function HTTPParseQuery(const AQuery:String; AParams:THTTPParams):Boolean;
Description: To be documented


[Expand]
function HTTPBuildQuery(AParams:THTTPParams; var AQuery:String):Boolean;
Description: To be documented


[Expand]
function HTTPParseHeader(const AHeader:String; var AName,AValue:String):Boolean;
Description: To be documented


[Expand]
function HTTPBuildHeader(const AName,AValue:String; var AHeader:String):Boolean;
Description: To be documented


[Expand]
function HTTPPathExtractName(const ASource:String; var AName:String):Boolean;
Description: To be documented


[Expand]
function HTTPPathExtractDir(const ASource:String; var APath:String):Boolean;
Description: To be documented


[Expand]
function HTTPPathExtractPath(const ASource:String; var APath:String):Boolean;
Description: To be documented


[Expand]
function HTTPPathExtractExtension(const ASource:String; var AExtension:String):Boolean;
Description: To be documented


[Expand]
function HTTPParseRequestLine(const ARequest:String; var AMethod:LongWord; var AURL:String; var AVersion:LongWord):Boolean;
Description: To be documented


[Expand]
function HTTPBuildRequestLine(AMethod:LongWord; const AURL:String; AVersion:LongWord; var ARequest:String):Boolean;
Description: To be documented


[Expand]
function HTTPParseResponseLine(const AResponse:String; var AVersion,AStatus:LongWord; var AReason:String):Boolean;
Description: To be documented


[Expand]
function HTTPBuildResponseLine(AVersion,AStatus:LongWord; const AReason:String; var AResponse:String):Boolean;
Description: To be documented


[Expand]
function FileTimeToHTTPDate(const AFileTime:TFileTime):String;
Description: To be documented


[Expand]
function HTTPDateToFileTime(const AHTTPDate:String):TFileTime;
Description: To be documented


[Expand]
function DateTimeToHTTPDate(const ADateTime:TDateTime):String;
Description: To be documented


[Expand]
function HTTPDateToDateTime(const AHTTPDate:String):TDateTime;
Description: To be documented


[Expand]
function StringToHTTPProtocol(const AProtocol:String):LongWord;
Description: To be documented


[Expand]
function HTTPProtocolToString(AProtocol:LongWord):String;
Description: To be documented


[Expand]
function StringToHTTPMethod(const AMethod:String):LongWord;
Description: To be documented


[Expand]
function HTTPMethodToString(AMethod:LongWord):String;
Description: To be documented


[Expand]
function StringToHTTPVersion(const AVersion:String):LongWord;
Description: To be documented


[Expand]
function HTTPVersionToString(AVersion:LongWord):String;
Description: To be documented


[Expand]
function StringToHTTPEncoding(const AEncoding:String):LongWord;
Description: To be documented


[Expand]
function HTTPEncodingToString(AEncoding:LongWord):String;
Description: To be documented


[Expand]
function StringToHTTPStatus(const AStatus:String):LongWord;
Description: To be documented


[Expand]
function HTTPStatusToString(AStatus:LongWord):String;
Description: To be documented


[Expand]
procedure HTTPLog(Level:LongWord;const AText:String);
Description: To be documented


[Expand]
procedure HTTPLogInfo(const AText:String); inline;
Description: To be documented


[Expand]
procedure HTTPLogWarn(const AText:String); inline;
Description: To be documented


[Expand]
procedure HTTPLogError(const AText:String); inline;
Description: To be documented


[Expand]
procedure HTTPLogDebug(const AText:String); inline;
Description: To be documented


Return to Unit Reference