4.0.0 • Published 10 years ago
immutable-http v4.0.0
Immutable-http
Http client with pretty simple chaining API
Usage
import executor from 'third-party-executor'
var result = new Http().url('http://any_api.com/:id')
.executor(executor)
.method('GET')
.header('Content-Type','application/json')
.body({some:data})
.responseType('json')
.segment('id',123)
.query('filter','some_filter') // Adds query section for the url like '?filter=some_filter'
.exec(); // returns Promiseexecutor is just a function with signature
f(url: String, method: String, headers:Array[Tuple[String, String]], responseType: String, body: Any): PromiseIt allows you to have your own favorite HTTP library under the hood and be able to test your code with mocked executor without any hacks.
Executor implementation example
Build
npm run distTests
Run
npm test4.0.0
10 years ago
3.1.2
10 years ago
3.1.1
10 years ago
3.1.0
10 years ago
0.3.0
10 years ago
0.2.1
10 years ago
0.2.0
10 years ago
0.1.14
10 years ago
0.1.13
10 years ago
0.1.12
10 years ago
0.1.11
10 years ago
0.1.10
10 years ago
0.1.9
10 years ago
0.1.8
11 years ago
0.1.7
11 years ago
0.1.6
11 years ago
0.1.5
11 years ago
0.1.4
11 years ago
0.1.3
11 years ago
0.1.2
11 years ago
0.1.1
11 years ago
0.1.0
11 years ago
0.0.9
11 years ago
0.0.8
11 years ago
0.0.7
11 years ago
0.0.5
11 years ago
0.0.4
11 years ago
0.0.3
11 years ago
0.0.2
11 years ago
0.0.1
11 years ago