summary refs log tree commit diff stats
path: root/lib/pure/httpclient.nim
Commit message (Collapse)AuthorAgeFilesLines
* move since from inclrtl to std/private/since (#14188)hlaaftana2020-05-021-1/+1
| | | | * move since from inclrtl to std/private/since * move since import in system below for HCR
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-3/+3
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* New runnableExample for `newAsyncHttpClient()` (#14045)Tristram Oaten2020-04-211-0/+11
|
* Fix broken async httpclient exampleTristram Oaten2020-04-211-3/+7
| | | | | | | | | | | | | | | | | As the async httpclient is almost certainly the first async example beginners will want to try, we OWE it to them to give them a real example. Example repeated here for clarity: ```nim import asyncdispatch, httpclient proc asyncProc(): Future[string] {.async.} = var client = newAsyncHttpClient() return await client.getContent("http://example.com") echo waitFor asyncProc() ``` This is my first Nim contribution, please let me know if the code is right. (it runs on my machine, but may not be the best example)
* fix #13894, httpclient hang on Http204narimiran2020-04-071-1/+1
|
* SSL certificate verify GitHub action (#13697)Federico Ceratto2020-03-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement SSL/TLS certificate checking #782 * SSL: Add nimDisableCertificateValidation Remove NIM_SSL_CERT_VALIDATION env var tests/untestable/thttpclient_ssl.nim ran successfully on Linux with libssl 1.1.1d * SSL: update integ test to skip flapping tests * Revert .travis.yml change * nimDisableCertificateValidation disable imports Prevent loading symbols that are not defined on older SSL libs * SSL: disable verification in net.nim ..when nimDisableCertificateValidation is set * Update changelog * Fix peername type * Add define check for windows * Disable test on windows * Add exprimental GitHub action CI for SSL * Test nimDisableCertificateValidation
* Implement file streaming for httpclient's MultipartData (#12982)Zed2020-03-061-147/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `uploadFile` to POST files by streaming them * Use constant for \c\L * Formatting * Remove uploadFile * Implement MultipartData file streaming * Remove unnecessary var annotations * Call string on TaintedStrings Fixes #12789 * Move cl constant to httpcore * Fix `request` inconsistencies * Update documentaion * Clean up * Skip multipart formatting when there's 0 entries * Remove extraneous `cl` from multipart formatting * Update MultipartData `$` to match old behaviour * Update comment * Address comments
* httpclient, maxredirects to Natural, newHttpClient/newAsyncHttpClient add ↵Juan Carlos2020-01-211-5/+9
| | | | headers argument instead of hardcoded empty (#13207)
* Added fix for handling TaintedStrings in streams and httpclient (#12969)Sam Wang2019-12-291-4/+4
| | | | | | * Added fix for taint mode in streams and httpclient * Removed taintMode export from system.nim
* Allow customize Host headerJack Tang2019-12-281-4/+5
|
* fix httpclient.lastModified bad pattern in parsing (#12698)Pierre-Jean Grenier2019-11-291-1/+1
|
* [backport] Fix style issues in lib/, tools/, and testament/. Fixes #12687. ↵3n-k12019-11-281-3/+3
| | | | (#12754)
* replace some runtime repr in stdlib for gc:arc (#12716)Andy Davidoff2019-11-251-1/+1
|
* fixes #11863 multipart data need $ (#12707)Andreas Rumpf2019-11-221-0/+13
| | | | | * fixes #11863 * improved the code; refs #12412
* About 50% faster base64 implemention. (#12436)treeform2019-10-171-1/+1
|
* [backport] run nimpretty on web stuffnarimiran2019-09-301-13/+14
|
* Revert "improvements for httpcore (#12228)"narimiran2019-09-231-4/+4
| | | | This reverts commit b865c2a54b7d706b31b5eba29dfdbb16809aa400.
* improvements for httpcore (#12228)Andreas Rumpf2019-09-231-4/+4
| | | | | * improvements for httpcore * further improvements, now stable API but needs extensions later on
* Remove old and unused parseBody/parseResponse procs in httpclient. (#11949)Dominik Picheta2019-08-261-130/+2
|
* Fixes regression introduced by #11904. (#11948)Dominik Picheta2019-08-151-2/+4
|
* Fix issue #10726 - HTTP response without Content-Length is not accessible ↵konradmb2019-08-081-2/+8
| | | | | | | | | | | | (#11904) * Add patch by @xenogenesi * Async test for HTTP/1.1 without Content-Length * Apply suggestions from code review Co-Authored-By: Dominik Picheta <dominikpicheta@googlemail.com>
* Use std/monotimes in the stdlibOscar Nihlgård2019-07-161-5/+5
|
* make more parts of the stdlib compile with --styleCheck:errorAraq2019-07-101-14/+14
|
* [documentation] fix #11281, httpclient examples (#11455)Juan Carlos2019-06-101-1/+48
|
* added getSocket proc (#11233)Boris Shomodjvarac2019-05-151-0/+15
|
* Fixes #10357 (#10618)Juan Carlos2019-02-131-1/+1
|
* Updated httpClient.nim: added import httpClient statements in examplesMandeep Singh2019-01-261-0/+2
| | | Added import httpClient statements in examples, as it was not obvious for a new started from python regarding what to import
* Remove long deprecated stuff (#10332)Miran2019-01-181-243/+0
|
* Merge pull request #9548 from tonygparsehub/put-deleteDominik Picheta2018-11-231-42/+78
|\ | | | | fix #8777 add missing http methods in httpClient
| * fix #8777 add missing http methods in httpClientTony G2018-10-301-42/+78
| |
* | removes deprecated T/P typesAraq2018-11-161-3/+1
|/
* fixes #7842 if no uri.scheme specified raise ValueError with hint (#7846)David Krause2018-10-271-0/+3
| | | | | | | | * fixes #7842 if no uri.scheme specified on request rais ValueError with hint Signed-off-by: enthus1ast <david@code0.xyz> * Update httpclient.nim
* even more strict isNil handling for strings/seqs in order to detect bugsAraq2018-08-221-2/+2
|
* fixes more nil handling regressionsAraq2018-08-131-7/+7
|
* make more tests greenAndreas Rumpf2018-08-131-1/+1
|
* AsyncHttpClient: return from requests before body completionEmery Hemingway2018-08-081-2/+13
| | | | | | | | | Store the body completion future at the client and wait for it to complete before issuing additional requests. This allows the body FutureStream reader to drain the stream and read buffers to be freed asynchronously. Fix #8109
* Minor doc fixFederico Ceratto2018-06-231-1/+1
|
* hotfix: fixes SSL initialization for httpclient with --threads:on (#7863)Andreas Rumpf2018-05-221-20/+18
| | | | * hotfix: fixes SSL initialization for httpclient with --threads:on
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-11/+5
|
* Fixes crash in httpclient due to new string indexing rules.Dominik Picheta2018-05-041-1/+1
|
* make httpclient work without zero terminatorsAndreas Rumpf2018-04-291-7/+3
|
* fix #7680 (#7683)hlaaf2018-04-261-3/+6
| | | | | | | | | | * fix #7680 * Don't send on every HTTP method * These should be squashed * 80 column limit
* Improve progress reporting example. Refs #7693Dominik Picheta2018-04-251-3/+8
|
* copy pastable progress reporting exampleDavid Krause2018-04-251-1/+2
|
* Call requestAux not request in httpclient.Dominik Picheta2018-04-071-1/+1
|
* fixes httpclient documentation commentAraq2018-03-121-1/+1
|
* Improve SSL error message in httpclient.Dominik Picheta2018-02-221-5/+6
|
* Merges #7226 manually.Dominik Picheta2018-02-191-0/+25
|
* Workaround 'defer' issue in httpclient.downloadFile. Refs #3877. (#7101)Dominik Picheta2018-01-181-13/+32
|
* Fixed crash in ssl httpclientYuriy Glukhov2018-01-111-3/+9
|