Module http_request

Consts

RESULT_SUCCESS* = 0'i64
RESULT_CHUNKED_BODY_SIZE_MISMATCH* = 1'i64
RESULT_CANT_CONNECT* = 2'i64
RESULT_CANT_RESOLVE* = 3'i64
RESULT_CONNECTION_ERROR* = 4'i64
RESULT_SSL_HANDSHAKE_ERROR* = 5'i64
RESULT_NO_RESPONSE* = 6'i64
RESULT_BODY_SIZE_LIMIT_EXCEEDED* = 7'i64
RESULT_REQUEST_FAILED* = 8'i64
RESULT_DOWNLOAD_FILE_CANT_OPEN* = 9'i64
RESULT_DOWNLOAD_FILE_WRITE_ERROR* = 10'i64
RESULT_REDIRECT_LIMIT_REACHED* = 11'i64

Procs

proc useThreads*(self: HTTPRequest): bool {.
gcsafe, locks: 0
.}
proc `useThreads =`*(self: HTTPRequest; val: bool) {.
gcsafe, locks: 0
.}
proc bodySizeLimit*(self: HTTPRequest): int64 {.
gcsafe, locks: 0
.}
proc `bodySizeLimit =`*(self: HTTPRequest; val: int64) {.
gcsafe, locks: 0
.}
proc maxRedirects*(self: HTTPRequest): int64 {.
gcsafe, locks: 0
.}
proc `maxRedirects =`*(self: HTTPRequest; val: int64) {.
gcsafe, locks: 0
.}
proc request*(self: HTTPRequest; url: string; customHeaders: PoolStringArray;
             sslValidateDomain: bool = true; methodd: int64 = 0'i64;
             requestData: string = ""): Error {.
gcsafe, locks: 0
.}
proc cancelRequest*(self: HTTPRequest) {.
gcsafe, locks: 0
.}
proc getHttpClientStatus*(self: HTTPRequest): int64 {.
gcsafe, locks: 0
.}
proc setDownloadFile*(self: HTTPRequest; path: string) {.
gcsafe, locks: 0
.}
proc getDownloadFile*(self: HTTPRequest): string {.
gcsafe, locks: 0
.}
proc getDownloadedBytes*(self: HTTPRequest): int64 {.
gcsafe, locks: 0
.}
proc getBodySize*(self: HTTPRequest): int64 {.
gcsafe, locks: 0
.}

Methods

method redirectRequest*(self: HTTPRequest; arg0: string) {.
gcsafe, locks: 0, base
.}
method requestDone*(self: HTTPRequest; arg0: int64; arg1: int64; arg2: PoolStringArray;
                   arg3: PoolByteArray) {.
gcsafe, locks: 0, base
.}