Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juancarlospaco/harpoon
HTTP Harpoon, HTTP Client
https://github.com/juancarlospaco/harpoon
async high-performance http http-client https network nim nim-lang
Last synced: about 1 month ago
JSON representation
HTTP Harpoon, HTTP Client
- Host: GitHub
- URL: https://github.com/juancarlospaco/harpoon
- Owner: juancarlospaco
- License: mit
- Created: 2021-07-05T18:18:44.000Z (over 3 years ago)
- Default Branch: nim
- Last Pushed: 2022-02-09T16:17:00.000Z (almost 3 years ago)
- Last Synced: 2024-10-15T00:54:22.352Z (2 months ago)
- Topics: async, high-performance, http, http-client, https, network, nim, nim-lang
- Language: Nim
- Homepage: https://juancarlospaco.github.io/harpoon
- Size: 69.3 KB
- Stars: 46
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# HTTP Harpoon: Clandestine HTTP Client.
- Same API as stdlib `HttpClient`.
- 1 file, 0 dependencies, 300 lines, pure Nim.
- No Curl nor LibCurl dependencies.
- Async and sync client.
- Works with ARC and ORC.
- Works with `strictFuncs`.
- Uses `Uri` type for URL.
- Response has `isIpv6: bool` attribute.
- `GET` and `POST` from JSON to JSON directly.
- `downloadFile` that takes `openArray` of URLs.
- HTTP Headers can be compile-time immutable `const`.
- Proxy support, with Auth.
- Timeout support for Async and Sync.
- Option to skip parsing Headers or Status or Body, if you dont need them.
- HTTP Methods use `HttpMethod` enum, not strings. Status code use `HttpCode` not integers.
- No heavy objects, designed as a tiny `proc` attached to a vanilla `Socket`.
- Share a `Socket` with multiple clients, reuse `Socket`.
- Theres no open/close functions for the client, just call `get()` or `post()`.
- Works with Threads, Tasks, and other Async implementations.
- Uses very few symbols from stdlib, very future proof.
- `runnableExamples` with `doAssert` for everything.
- Documentation online.