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












0
















This question already has an answer here:




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

    3 answers



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

    5 answers



  • How to allow CORS?

    23 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 '18 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 '18 at 1:11
















0
















This question already has an answer here:




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

    3 answers



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

    5 answers



  • How to allow CORS?

    23 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 '18 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 '18 at 1:11














0












0








0









This question already has an answer here:




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

    3 answers



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

    5 answers



  • How to allow CORS?

    23 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

    3 answers



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

    5 answers



  • How to allow CORS?

    23 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

    3 answers



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

    5 answers



  • How to allow CORS?

    23 answers








javascript cors fetch






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 1:32







Anthony C

















asked Nov 22 '18 at 1:04









Anthony CAnthony 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 '18 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 '18 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 '18 at 1:11



















  • Maybe you should show us some code.

    – epascarello
    Nov 22 '18 at 1:11

















Maybe you should show us some code.

– epascarello
Nov 22 '18 at 1:11





Maybe you should show us some code.

– epascarello
Nov 22 '18 at 1:11












0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

Origin of the phrase “under your belt”?