How to set up fetch and cors so that a post from the frontend to a server will allow request.status to be...











up vote
0
down vote

favorite













This question already has an answer here:




  • Trying to use fetch and pass in mode: no-cors

    1 answer



  • Handle response - SyntaxError: Unexpected end of input when using mode: 'no-cors'

    4 answers



  • How to allow CORS?

    22 answers




My problem is the response I get from fetch is empty. I am hitting an endpoint on a server from my frontend. I am very concerned about status 404 which is not an error and has to be handled.
I am programming in javascript using the Stripe API.



fetch using no-cors cant read response










share|improve this question















marked as duplicate by charlietfl, sideshowbarker cors
Users with the  cors badge can single-handedly close cors questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 22 at 4:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Maybe you should show us some code.
    – epascarello
    Nov 22 at 1:11















up vote
0
down vote

favorite













This question already has an answer here:




  • Trying to use fetch and pass in mode: no-cors

    1 answer



  • Handle response - SyntaxError: Unexpected end of input when using mode: 'no-cors'

    4 answers



  • How to allow CORS?

    22 answers




My problem is the response I get from fetch is empty. I am hitting an endpoint on a server from my frontend. I am very concerned about status 404 which is not an error and has to be handled.
I am programming in javascript using the Stripe API.



fetch using no-cors cant read response










share|improve this question















marked as duplicate by charlietfl, sideshowbarker cors
Users with the  cors badge can single-handedly close cors questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 22 at 4:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Maybe you should show us some code.
    – epascarello
    Nov 22 at 1:11













up vote
0
down vote

favorite









up vote
0
down vote

favorite












This question already has an answer here:




  • Trying to use fetch and pass in mode: no-cors

    1 answer



  • Handle response - SyntaxError: Unexpected end of input when using mode: 'no-cors'

    4 answers



  • How to allow CORS?

    22 answers




My problem is the response I get from fetch is empty. I am hitting an endpoint on a server from my frontend. I am very concerned about status 404 which is not an error and has to be handled.
I am programming in javascript using the Stripe API.



fetch using no-cors cant read response










share|improve this question
















This question already has an answer here:




  • Trying to use fetch and pass in mode: no-cors

    1 answer



  • Handle response - SyntaxError: Unexpected end of input when using mode: 'no-cors'

    4 answers



  • How to allow CORS?

    22 answers




My problem is the response I get from fetch is empty. I am hitting an endpoint on a server from my frontend. I am very concerned about status 404 which is not an error and has to be handled.
I am programming in javascript using the Stripe API.



fetch using no-cors cant read response





This question already has an answer here:




  • Trying to use fetch and pass in mode: no-cors

    1 answer



  • Handle response - SyntaxError: Unexpected end of input when using mode: 'no-cors'

    4 answers



  • How to allow CORS?

    22 answers








javascript cors fetch






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 at 1:32

























asked Nov 22 at 1:04









Anthony C

11




11




marked as duplicate by charlietfl, sideshowbarker cors
Users with the  cors badge can single-handedly close cors questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 22 at 4:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by charlietfl, sideshowbarker cors
Users with the  cors badge can single-handedly close cors questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 22 at 4:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Maybe you should show us some code.
    – epascarello
    Nov 22 at 1:11


















  • Maybe you should show us some code.
    – epascarello
    Nov 22 at 1:11
















Maybe you should show us some code.
– epascarello
Nov 22 at 1:11




Maybe you should show us some code.
– epascarello
Nov 22 at 1:11

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Berounka

Different font size/position of beamer's navigation symbols template's content depending on regular/plain...

Sphinx de Gizeh