Documentation Tutorials

Requesting

js-web is using the axios library to make http requests

import {
  redirect
} from 'js-web'

GET Request

request.get('/some-uri')
request.get('/some-uri',params)

POST Request

request.post('/some-uri')
request.post('/some-uri',params)
request.post('/some-uri',{param1: 'value',param2: 'value'})

Request an image

You can download an image with the request.image function.

request.image('/image-url','/assets/new-image.jpg')