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 downloadFile(self: HTTPRequest): string {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc downloadFile=(self: HTTPRequest; val: string) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc useThreads(self: HTTPRequest): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc useThreads=(self: HTTPRequest; val: bool) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc bodySizeLimit(self: HTTPRequest): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc bodySizeLimit=(self: HTTPRequest; val: int64) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc maxRedirects(self: HTTPRequest): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc maxRedirects=(self: HTTPRequest; val: int64) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc request(self: HTTPRequest; url: string;
            customHeaders: PoolStringArray = newPoolStringArray();
            sslValidateDomain: bool = true; methodd: int64 = 0'i64;
            requestData: string = ""): Error {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc cancelRequest(self: HTTPRequest) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getHttpClientStatus(self: HTTPRequest): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getDownloadedBytes(self: HTTPRequest): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getBodySize(self: HTTPRequest): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}

Methods

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