Module http_client

Search:
Group by:

Consts

METHOD_GET* = 0'i64
METHOD_HEAD* = 1'i64
METHOD_POST* = 2'i64
METHOD_PUT* = 3'i64
METHOD_DELETE* = 4'i64
METHOD_OPTIONS* = 5'i64
METHOD_TRACE* = 6'i64
METHOD_CONNECT* = 7'i64
METHOD_MAX* = 8'i64
STATUS_DISCONNECTED* = 0'i64
STATUS_RESOLVING* = 1'i64
STATUS_CANT_RESOLVE* = 2'i64
STATUS_CONNECTING* = 3'i64
STATUS_CANT_CONNECT* = 4'i64
STATUS_CONNECTED* = 5'i64
STATUS_REQUESTING* = 6'i64
STATUS_BODY* = 7'i64
STATUS_CONNECTION_ERROR* = 8'i64
STATUS_SSL_HANDSHAKE_ERROR* = 9'i64
RESPONSE_CONTINUE* = 100'i64
RESPONSE_SWITCHING_PROTOCOLS* = 101'i64
RESPONSE_PROCESSING* = 102'i64
RESPONSE_OK* = 200'i64
RESPONSE_CREATED* = 201'i64
RESPONSE_ACCEPTED* = 202'i64
RESPONSE_NON_AUTHORITATIVE_INFORMATION* = 203'i64
RESPONSE_NO_CONTENT* = 204'i64
RESPONSE_RESET_CONTENT* = 205'i64
RESPONSE_PARTIAL_CONTENT* = 206'i64
RESPONSE_MULTI_STATUS* = 207'i64
RESPONSE_IM_USED* = 226'i64
RESPONSE_MULTIPLE_CHOICES* = 300'i64
RESPONSE_MOVED_PERMANENTLY* = 301'i64
RESPONSE_FOUND* = 302'i64
RESPONSE_SEE_OTHER* = 303'i64
RESPONSE_NOT_MODIFIED* = 304'i64
RESPONSE_USE_PROXY* = 305'i64
RESPONSE_TEMPORARY_REDIRECT* = 307'i64
RESPONSE_BAD_REQUEST* = 400'i64
RESPONSE_UNAUTHORIZED* = 401'i64
RESPONSE_PAYMENT_REQUIRED* = 402'i64
RESPONSE_FORBIDDEN* = 403'i64
RESPONSE_NOT_FOUND* = 404'i64
RESPONSE_METHOD_NOT_ALLOWED* = 405'i64
RESPONSE_NOT_ACCEPTABLE* = 406'i64
RESPONSE_PROXY_AUTHENTICATION_REQUIRED* = 407'i64
RESPONSE_REQUEST_TIMEOUT* = 408'i64
RESPONSE_CONFLICT* = 409'i64
RESPONSE_GONE* = 410'i64
RESPONSE_LENGTH_REQUIRED* = 411'i64
RESPONSE_PRECONDITION_FAILED* = 412'i64
RESPONSE_REQUEST_ENTITY_TOO_LARGE* = 413'i64
RESPONSE_REQUEST_URI_TOO_LONG* = 414'i64
RESPONSE_UNSUPPORTED_MEDIA_TYPE* = 415'i64
RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE* = 416'i64
RESPONSE_EXPECTATION_FAILED* = 417'i64
RESPONSE_UNPROCESSABLE_ENTITY* = 422'i64
RESPONSE_LOCKED* = 423'i64
RESPONSE_FAILED_DEPENDENCY* = 424'i64
RESPONSE_UPGRADE_REQUIRED* = 426'i64
RESPONSE_INTERNAL_SERVER_ERROR* = 500'i64
RESPONSE_NOT_IMPLEMENTED* = 501'i64
RESPONSE_BAD_GATEWAY* = 502'i64
RESPONSE_SERVICE_UNAVAILABLE* = 503'i64
RESPONSE_GATEWAY_TIMEOUT* = 504'i64
RESPONSE_HTTP_VERSION_NOT_SUPPORTED* = 505'i64
RESPONSE_INSUFFICIENT_STORAGE* = 507'i64
RESPONSE_NOT_EXTENDED* = 510'i64

Procs

proc connectToHost*(self: HTTPClient; host: string; port: int64; useSsl: bool = false;
                   verifyHost: bool = true): int64 {.
gcsafe, locks: 0
.}
proc setConnection*(self: HTTPClient; connection: StreamPeer) {.
gcsafe, locks: 0
.}
proc getConnection*(self: HTTPClient): StreamPeer {.
gcsafe, locks: 0
.}
proc requestRaw*(self: HTTPClient; methodd: int64; url: string;
                headers: PoolStringArray; body: PoolByteArray): int64 {.
gcsafe, locks: 0
.}
proc request*(self: HTTPClient; methodd: int64; url: string; headers: PoolStringArray;
             body: string = ""): int64 {.
gcsafe, locks: 0
.}
proc sendBodyText*(self: HTTPClient; body: string): int64 {.
gcsafe, locks: 0
.}
proc sendBodyData*(self: HTTPClient; body: PoolByteArray): int64 {.
gcsafe, locks: 0
.}
proc close*(self: HTTPClient) {.
gcsafe, locks: 0
.}
proc hasResponse*(self: HTTPClient): bool {.
gcsafe, locks: 0
.}
proc isResponseChunked*(self: HTTPClient): bool {.
gcsafe, locks: 0
.}
proc getResponseCode*(self: HTTPClient): int64 {.
gcsafe, locks: 0
.}
proc getResponseHeaders*(self: HTTPClient): PoolStringArray {.
gcsafe, locks: 0
.}
proc getResponseHeadersAsDictionary*(self: HTTPClient): Dictionary {.
gcsafe, locks: 0
.}
proc getResponseBodyLength*(self: HTTPClient): int64 {.
gcsafe, locks: 0
.}
proc readResponseBodyChunk*(self: HTTPClient): PoolByteArray {.
gcsafe, locks: 0
.}
proc setReadChunkSize*(self: HTTPClient; bytes: int64) {.
gcsafe, locks: 0
.}
proc setBlockingMode*(self: HTTPClient; enabled: bool) {.
gcsafe, locks: 0
.}
proc isBlockingModeEnabled*(self: HTTPClient): bool {.
gcsafe, locks: 0
.}
proc getStatus*(self: HTTPClient): int64 {.
gcsafe, locks: 0
.}
proc poll*(self: HTTPClient): int64 {.
gcsafe, locks: 0
.}
proc queryStringFromDict*(self: HTTPClient; fields: Dictionary): string {.
gcsafe, locks: 0
.}