Answers for "react js http post 500 internal server error"

0

react js http post 500 internal server error

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);
  });
Posted by: Guest on May-13-2020
0

react js http post 500 internal server error

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');
Posted by: Guest on May-13-2020

Code answers related to "react js http post 500 internal server error"

Code answers related to "Javascript"

Browse Popular Code Answers by Language