i have post request axios in react :
postrunsimulation(simulationid) { var requestanalysis = `${configfile.web.backend}analysis/${simulationid}/run`; return axios.post(requestanalysis) .then(function (response) { return response.headers; }, function(error) { throw new error('an error occurred : ' + error.status + ' - ' + error.statustext); }); },
the object in return has headers
property it's empty. if make same call postman, headers. doing wrong ?
if back-end running on different host or port web app, browser can access following 6 response headers default: cache-control
, content-language
, content-type
, expires
, last-modified
, , pragma
(see this answer). if server not return of them, headers
empty.
Comments
Post a Comment