weex-http
weex simple http lib
Installing
npm i weex-http --save-dev
# or
yarn add weex-http --dev
Example
Performing a GET request
weexHttp
Performing a POST request
weexHttp
Creating an instance
You can create a new instance of axios with a custom config.
weexHttp.create([config])
var instance = weexHttp
Options
- timeout number
default: 10000
ms - headers any
default: {}
- transformRequest Function[]
default: []
- transformHeaders Function[]
default: []
- transformResponse Function[]
default: []
Instance methods
The available instance methods are listed below. The specified config will be merged with the instance config.
weexHttp#get(url[, data[, config]])
weexHttp#delete(url[, data[, config]])
weexHttp#head(url[, data[, config]])
weexHttp#post(url[, data[, config]])
weexHttp#put(url[, data[, config]])
weexHttp#patch(url[, data[, config]])