What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-09 23:26:14
Nuxt js '@nuxtjs/markdownit'
export default { async asyncData({ $axios, $md }) { //I am also using axios to get the content from the Strapi API. const home = await $axios.$get("/home-page"); //This is where I use $md to parse the markdown for the example in t... Add solution -
Other 2021-11-09 13:14:17
infinite-scroll react
import { useState } from "react"; import useInView from "react-cool-inview"; import axios from "axios"; const App = () => { const [todos, setTodos] = useState(["todo-1", "todo-2", "..."]); ... Add solution -
Javascript 2021-11-07 10:30:18
axios configure base url
axios.defaults.baseURL = '/api/'; Add solution -
Other 2021-11-06 22:29:21
headers in axios.get
const axios = require('axios'); // httpbin.org gives you the headers in the response // body `res.data`. // See: https://httpbin.org/#/HTTP_Methods/get_get const res = await axios.get('https://httpbin.org/get', { headers: { 'Test-Header': 'test-val... Add solution -
Javascript 2021-11-06 20:05:23
how to send header in axios
const headers = { 'Content-Type': 'application/json', 'Authorization': 'JWT fefege...' } axios.post(Helper.getUserAPI(), data, { headers: headers }) .then((response) => { dispatch({ type: FOUND_USER, data: response.data[0] ... Add solution