https://github.com/pepe/jesty
Simple http client with request specification written in plain text
https://github.com/pepe/jesty
http-client janet plaintext
Last synced: 4 months ago
JSON representation
Simple http client with request specification written in plain text
- Host: GitHub
- URL: https://github.com/pepe/jesty
- Owner: pepe
- License: mit
- Created: 2020-06-15T09:57:56.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-29T07:47:38.000Z (over 5 years ago)
- Last Synced: 2025-11-15T16:01:40.432Z (7 months ago)
- Topics: http-client, janet, plaintext
- Size: 28.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
jesty
===========
REST client for text specified requests.
## Generale
Jesty uses simple HTTP request specificatin, which is based on actual HTTP
protocol. It is very simillar to the one emacs http-client plugin uses.
## Request specification format
Just plain text file. I am using http extension so I can have filetype set
in my editor.
```
1: # definitions <- keyword for headers (for now) definitions shared by all the specifications in this file
2: Accept: application/json <- shared header
3: <- empty line means end of definitions
4: # Patching on url <- comment means request spec start, and
5: PATCH https://my.api/products <- http verburl
6: Authorization: Bearer Avsdfasdfasdf <- optional header
7: Content-Type: application/json <- more headers
8: <- empty line means end of the header and start of the optional body
9: {
10: "price": "bambilion" <- body of the req
11: }
12: <- every request must end with empty line
13: # Patching on url with id <- another request spec start
...
```
See the test example in test dir.
## Installation:
You need latest development version of Janet programming language installed.
Then you can install jesty with jpm package manager:
`[sudo] jpm install https://github.com/pepe/jesty`.
## Usage:
`jesty < input.http` will execute all the requests specified in the input.http.
`jesty 5 < input.http` will execute the request specified on line 5 in the
input.http.
My usual tho is just to run buffer from Kakoune.