“React JS HTTP Post 500 Kesalahan Server Internal” Kode Jawaban

React JS HTTP Post 500 Kesalahan Server Internal

export default function callApi2(endpoint, method = 'GET', body) {

  let headers = { 'content-type': 'application/json' }
  console.log(body);

  return axios({
    method: method,
    url: `${Config.API_URL2}/${endpoint}`,
    data: JSON.stringify(body),
    headers: { 'content-type': 'application/json' },
  }).catch(err => {
    console.log(err);
  });
Motionless Macaw

React JS HTTP Post 500 Kesalahan Server Internal

 res.header('Access-Control-Allow-Origin', '*');
 res.header('Access-Control-Allow-Headers', 'Content-Type');
 res.header('Access-Control-Allow-Methods','GET, POST, PATCH, PUT, DELETE, OPTIONS');
Motionless Macaw

Jawaban yang mirip dengan “React JS HTTP Post 500 Kesalahan Server Internal”

Pertanyaan yang mirip dengan “React JS HTTP Post 500 Kesalahan Server Internal”

Lebih banyak jawaban terkait untuk “React JS HTTP Post 500 Kesalahan Server Internal” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya