“Axios GitHub” Kode Jawaban

AXIOS API Post Request

import qs from 'qs';
const data = { 'bar': 123 };
const options = {
  method: 'POST',
  headers: { 'content-type': 'application/x-www-form-urlencoded' },
  data: qs.stringify(data),
  url,
};
axios(options);
Amused Ant

Menggunakan Axios Kirim Permintaan Dapatkan ke Alamat:

// GET request for remote image
axios({
  method: 'get',
  url: 'http://bit.ly/2mTM3nY',
  responseType: 'stream'
})
  .then(function(response) {
  response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
});
Tame Toad

Github Axios

<script src="https://unpkg.com/axios/dist/axios.min.js"></script>http://www.tianqiapi.com/api?version=v6&appid=18836634&appsecret=15tosfbF
Puzzled Pollan

Axios GitHub

<!-- axios script for html -->
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
Cautious Crayfish

Jawaban yang mirip dengan “Axios GitHub”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya