Commit Graph

8 Commits

Author SHA1 Message Date
zah d298b0ba30
text/text is not a standardized content type (#34)
https://www.w3.org/Protocols/rfc1341/7_1_Text.html
2022-08-10 01:06:26 +03:00
Eugene Kabanov b3dc03be6e
Use new Content-Type parser and adopt ContentBody structure for it. (#32) 2022-08-06 11:35:46 +03:00
Zahary Karadjov 80ebc5b419
Allow the 'api' macro to be used in generic functions 2022-01-06 20:20:20 +02:00
Etan Kissling bfcbeceb65
allow reserved Nim keywords as REST params (#15)
This resolves a compilation error when specifying a reserved Nim keyword
as a REST parameter. The error was `node lacks field: strVal`, as the
corresponding identifiers need backticks embedding, e.g., `` `let` ``,
requiring an additional unwrap of `nnkAccQuoted` to get the raw ident.
2021-10-28 19:00:14 +03:00
Eugene Kabanov d0ed144b9c
Rest client (#3)
* Separate some macro helper procedures to common module.
Initial commit for client.

* Arguments pre-processing and createPath() with tests.

* Further progress on arguments.

* Add method checks.

* REST client release candidate.

* Add redirection support to client requests.
Move all network logic to procedures.
Add first test.
Add PrestoIdent default to REST server and client.

* Add agent.

* Fix url encoding in request's path.

* Fix client url-encoding handling.
RestApiResponse become case-object.
Make `-d:nimDumpRest` the only one dumping procedure.
Add rest client tests.

* Add logging support.

* Bump chronos dependency version.
2021-05-10 11:28:58 +03:00
cheatfate 991b5836f6
Add `redirect` macro to allow path redirection.
Add tests for `redirect` macro.
Add check for unique patterns in path and tests.
2021-04-13 11:56:21 +03:00
cheatfate d88d6471a8
Fix path problem. 2021-03-02 16:00:51 +02:00
cheatfate 9c9b061158
Initial implementation for review. 2021-03-02 15:50:16 +02:00