ArmoryNode / FluentRequest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

drawing

Fluent Request

Fluent Request is a small library implemented over http package. Its objective is to provide a friendly and useful interface when running http requests.

Usage

Fluent request's usage is based on Fluent Interface or Chain Callbacks where the class setting methods returns the class itself. Check the example:

resp, err := FluentRequest().
                Method("GET").
                Url("https://jsonplaceholder.typicode.com/todos/1").
                Run()

body, _ := ioutil.ReadAll(resp.Body)

fmt.Println(string(body))

// output
//{
//   "userId": 1,
//   "id": 1,
//   "title": "delectus aut autem",
//   "completed": false
//}

About


Languages

Language:Go 100.0%