An open API service indexing awesome lists of open source software.

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

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.