All Projects → owainlewis → relay

owainlewis / relay

Licence: other
Relay lets you write HTTP requests as easy to read, structured YAML and dispatch them easily using a CLI. Similar to tools like Postman

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to relay

Http Shortcuts
Android app to create home screen shortcuts that trigger arbitrary HTTP requests
Stars: ✭ 329 (+1395.45%)
Mutual labels:  http-client, http-requests
Restclient
🦄 Simple HTTP and REST client for Unity based on Promises, also supports Callbacks! 🎮
Stars: ✭ 675 (+2968.18%)
Mutual labels:  http-client, http-requests
Karin
An elegant promise based HTTP client for the browser and node.js [WIP]
Stars: ✭ 393 (+1686.36%)
Mutual labels:  http-client, http-requests
EthernetWebServer
This is simple yet complete WebServer library for AVR, Portenta_H7, Teensy, SAM DUE, SAMD21/SAMD51, nRF52, STM32, RP2040-based, etc. boards running Ethernet shields. The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32. Coexisting now with `ESP32 WebServer` and…
Stars: ✭ 118 (+436.36%)
Mutual labels:  http-client, http-requests
Frequest
FRequest - A fast, lightweight and opensource desktop application to make HTTP(s) requests
Stars: ✭ 130 (+490.91%)
Mutual labels:  http-client, http-requests
robotframework-httprequestlibrary
Robot Framework's library to test REST interfaces utilizing Apache HttpClient
Stars: ✭ 20 (-9.09%)
Mutual labels:  http-client, http-requests
Httpu
The terminal-first http client
Stars: ✭ 619 (+2713.64%)
Mutual labels:  http-client, http-requests
requester
The package provides a very thin wrapper (no external dependencies) for http.Client allowing the use of layers (middleware).
Stars: ✭ 14 (-36.36%)
Mutual labels:  http-client, http-requests
1c http
Подсистема 1С для работы с HTTP
Stars: ✭ 48 (+118.18%)
Mutual labels:  http-client, http-requests
Easygo
基于Kotlin、OkHttp的声明式网络框架,像写HTML界面一样写网络调用代码
Stars: ✭ 40 (+81.82%)
Mutual labels:  http-client, http-requests
Redes
High-level network layer abstraction library written in Swift.
Stars: ✭ 16 (-27.27%)
Mutual labels:  http-client, http-requests
pawn-requests
pawn-requests provides an API for interacting with HTTP(S) JSON APIs.
Stars: ✭ 56 (+154.55%)
Mutual labels:  http-client, http-requests
nativescript-http
The best way to do HTTP requests in NativeScript, a drop-in replacement for the core HTTP with important improvements and additions like proper connection pooling, form data support and certificate pinning
Stars: ✭ 32 (+45.45%)
Mutual labels:  http-client, http-requests
Node Request Retry
💂 Wrap NodeJS request module to retry http requests in case of errors
Stars: ✭ 330 (+1400%)
Mutual labels:  http-client, http-requests
centra
Core Node.js HTTP client
Stars: ✭ 52 (+136.36%)
Mutual labels:  http-client, http-requests
Requests
Convenient http client for java, inspired by python request module
Stars: ✭ 459 (+1986.36%)
Mutual labels:  http-client, http-requests
swish
C++ HTTP requests for humans
Stars: ✭ 52 (+136.36%)
Mutual labels:  http-client, http-requests
Gout
gout to become the Swiss Army Knife of the http client @^^@---> gout 是http client领域的瑞士军刀,小巧,强大,犀利。具体用法可看文档,如使用迷惑或者API用得不爽都可提issues
Stars: ✭ 749 (+3304.55%)
Mutual labels:  http-client, http-requests
EthernetWebServer SSL
Simple TLS/SSL Ethernet WebServer, HTTP Client and WebSocket Client library for for AVR, Portenta_H7, Teensy, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52 and RASPBERRY_PI_PICO boards using Ethernet shields W5100, W5200, W5500, ENC28J60 or Teensy 4.1 NativeEthernet/QNEthernet. It now supports Ethernet TLS/SSL Client. The library supports …
Stars: ✭ 40 (+81.82%)
Mutual labels:  http-client, http-requests
direwolf
Package direwolf is a convenient and easy to use http client written in Golang.
Stars: ✭ 44 (+100%)
Mutual labels:  http-client, http-requests

Relay

wercker status

Relay lets you write HTTP requests as easy to read, structured YAML and dispatch them easily using a CLI.

The motivation for this library is to have a Postman like tool for sharing HTTP reqests in a team. Relay lets you treat HTTP requests as human readable data files and store them in version control with your project.

Relay provides a CLI for executing the request only and no GUI.

Quickstart

Download the relevant binary from here. Add to your path i.e /usr/local/bin

Examples

Relay HTTP requests are defined as YAML with a simple structure. See the examples folder for more ideas.

A request definition can contain the following

Field Required Description
url Yes The full URL including protocol
method Yes HTTP method as uppercase
body No Optional HTTP request body
query No Optional key value query params appended to URL
headers No Key value HTTP headers

Here are some simple examples

Get request

This is the most basic HTTP request with only a method and URL defined.

description: A simple GET request
request:
  method: GET
  url: https://requestb.in/1ead0f91

Dispatch this request from the CLI as follows

relay examples/get.yml

Post request

description: A simple POST request with body
request:
  method: POST
  url: https://requestb.in/1ead0f91
  body: 'Hello, World!'

Get request with query params and HTTP headers

request:
  method: GET
  url: https://httpbin.org/get
  query:
    foo: bar
    baz: qux
  headers:
    Content-Type: application/json
    Authorization: Bearer {{env "AUTH_TOKEN"}}

Custom variables

Many times you will want to inject values into the templates. For example dynamic URLs like GET /foo/:id etc.

You can use a -params 'a=b c=d' flag format in the CLI. Here is an example of passing in custom variables

description: Example using injected values via params
request:
  method: GET
  url: https://api.mysite.com/users/{{.id}}
  headers:
    Content-Type: application/json
    Authorization: Bearer {{.authToken}}

Now we can dispatch it using the CLI

relay examples/dynamic.yaml -params 'id=1 authToken=XXX'

Functions

A selection of functions are provided to make life easier

Environment variables

The env function will extract an environment variable.

If the environment variable is not defined then an empty string is returned.

description: A simple request example that makes use of environment vars
request:
  method: GET
  url: https://httpbin.org/get
  headers:
    Content-Type: application/json
    Authorization: Bearer {{env "AUTH_TOKEN"}}

Basic Auth

description: A request with HTTP Basic Auth
request:
  method: GET
  url: https://requestb.in/1ead0f91
  headers:
    Authorization: Basic {{basic "USER" "PASS"}}

Basic 64 Encoding

Use b64encode

Advanced (Timeouts etc)

You can set an explicit HTTP request timeout as in the following examples:

description: A request with explicit request timeouts
request:
  method: GET
  url: https://requestb.in/1ead0f91
options:
  timeout: 20

Roadmap

  • CLI option for casting request to CURL request
  • Support for proxies
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].