Skip to content

Instantly share code, notes, and snippets.

@luandevpro
Created August 17, 2018 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luandevpro/496ce1b4870c01134b52ede96de04e21 to your computer and use it in GitHub Desktop.
Save luandevpro/496ce1b4870c01134b52ede96de04e21 to your computer and use it in GitHub Desktop.
import axios from 'axios'
import * as Types from '../constants/ActionTypes'
export const CallAPI = (endpoint, method = 'get', body) => {
return axios({
url: `${Types.URl_API}`,
method: method,
data: body
}).catch(err => console.log(err))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment