Greetings!
I am facing the following problem, I make a request [POST] via Fetch API and "call" does not complete.
REQUEST VIA Fetch API
const requestInfo = {
method: 'POST',
body: JSON.stringify({ email:'[email protected]' , password:'123456', entity:'provider'}),
headers: new Headers({'Content-type': 'application/json;charset=UTF-8'}),
};
fetch('http://localhost:4212/login',requestInfo)
.then(response => {
console.log(response);
return response.json();
})
.then(sucess => console.log(sucess))
.catch(error => console.log(error));
}
RESPONSE VIA Fetch API
Thestrangethingisthat[GET]typefunctionworksperfectly.
VIAPOSTMANREQUIREMENT
Viapostmanalsoworks[GET/POST].
HEADERS DELIVERED
access-control-allow-credentials →true
access-control-allow-headers →Origin, X-Requested-With, Content-Type, Accept, Accept-Encoding, Content-Encoding, X-Auth-Token
access-control-allow-methods →POST, GET, PUT, OPTIONS, DELETE, PATCH
access-control-allow-origin →*
access-control-max-age →3600
cache-control →no-cache, no-store, max-age=0, must-revalidate
content-encoding →gzip
content-type →application/json;charset=UTF-8
date →Thu, 27 Jul 2017 02:14:50 GMT
expires →0
pragma →no-cache
transfer-encoding →chunked
vary →Accept-Encoding
x-content-type-options →nosniff
x-frame-options →DENY
x-xss-protection →1; mode=block
Do you know what it can be?
Thank you!