Why do I get 400 bad request in Edge browser only, with fetch?









up vote
0
down vote

favorite












I am developing a Wordpress plugin and in admin settings (only) I get bad request 400 when using fetch API but only in Edge browser. Why could this be? I cleared the cookies, but it didn't help.



I would paste more code, but it would be irrelevant since it works perfectly on every other browser, but Edge.



I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same.










share|improve this question























  • Without the code how could we test it in Edge?
    – antfuentes87
    Nov 10 at 15:20














up vote
0
down vote

favorite












I am developing a Wordpress plugin and in admin settings (only) I get bad request 400 when using fetch API but only in Edge browser. Why could this be? I cleared the cookies, but it didn't help.



I would paste more code, but it would be irrelevant since it works perfectly on every other browser, but Edge.



I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same.










share|improve this question























  • Without the code how could we test it in Edge?
    – antfuentes87
    Nov 10 at 15:20












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am developing a Wordpress plugin and in admin settings (only) I get bad request 400 when using fetch API but only in Edge browser. Why could this be? I cleared the cookies, but it didn't help.



I would paste more code, but it would be irrelevant since it works perfectly on every other browser, but Edge.



I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same.










share|improve this question















I am developing a Wordpress plugin and in admin settings (only) I get bad request 400 when using fetch API but only in Edge browser. Why could this be? I cleared the cookies, but it didn't help.



I would paste more code, but it would be irrelevant since it works perfectly on every other browser, but Edge.



I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same.







wordpress fetch microsoft-edge http-status-code-400






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 13:02

























asked Nov 10 at 15:15









Aurimas

584823




584823











  • Without the code how could we test it in Edge?
    – antfuentes87
    Nov 10 at 15:20
















  • Without the code how could we test it in Edge?
    – antfuentes87
    Nov 10 at 15:20















Without the code how could we test it in Edge?
– antfuentes87
Nov 10 at 15:20




Without the code how could we test it in Edge?
– antfuentes87
Nov 10 at 15:20












1 Answer
1






active

oldest

votes

















up vote
1
down vote













From inception Edge appears to have bee out of sync with other browser implementations for fetch (even missing some native methods).



Issues: 24 Aug 2018 "Fetch Api post not working in latest version of edge" (not fixed). I'm not sure if this has the same root as your issue. One contributor solved problem for them by ensuring body is string e.g.



body: urlParams(
username: this.state.username,
password: this.state.password,
_csrf: token
).toString()


A report of 400 fetch issue in 2016 was referred on to an issue identifying another Edge feature "It looks like we put LEFT-TO-RIGHT MARK (U+200E) around punctuation marks, but Chrome and Firefox don't."



In Edge dev tools (F12) check console log for JS errors; and under Network check what you are actually sending to your server.






share|improve this answer




















  • Thanks. I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same. So the GET request doesn't use body at all as far as I understand..
    – Aurimas
    Nov 11 at 13:02











  • 1: If actual status 400 then by implication your server got the request. I guess you should be able to see exactly what Edge sent via Dev Tools - Network - select appropriate request then click "Header" etc and maybe find content causing error. developer.microsoft.com/en-us/microsoft-edge/platform/issues/… . I don't think I can add any more as my experience is limited to use of jquery Ajax.
    – scytale
    Nov 11 at 14:16











  • 2: Note. There is an occasional intermittent glitch (at least on my PC) with Edge; I can submit a URL (even for a simple page) and Dev Tools Network sometimes fails to list/record any of the resulting requests (even for simple pages).
    – scytale
    Nov 11 at 14:16










  • Can you try to provide a sample code or a detailed steps to reproduce the issue on our side? Then We can try to make a test. With only this error, it is not possible for us to find the root cause for the issue as this error can be occur due to various reasons. You can also try to make a test using other machine with MS Edge to check whether you get similar error or not. It can help to narrow down the issue.
    – Deepak-MSFT
    Nov 14 at 8:44










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53240308%2fwhy-do-i-get-400-bad-request-in-edge-browser-only-with-fetch%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













From inception Edge appears to have bee out of sync with other browser implementations for fetch (even missing some native methods).



Issues: 24 Aug 2018 "Fetch Api post not working in latest version of edge" (not fixed). I'm not sure if this has the same root as your issue. One contributor solved problem for them by ensuring body is string e.g.



body: urlParams(
username: this.state.username,
password: this.state.password,
_csrf: token
).toString()


A report of 400 fetch issue in 2016 was referred on to an issue identifying another Edge feature "It looks like we put LEFT-TO-RIGHT MARK (U+200E) around punctuation marks, but Chrome and Firefox don't."



In Edge dev tools (F12) check console log for JS errors; and under Network check what you are actually sending to your server.






share|improve this answer




















  • Thanks. I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same. So the GET request doesn't use body at all as far as I understand..
    – Aurimas
    Nov 11 at 13:02











  • 1: If actual status 400 then by implication your server got the request. I guess you should be able to see exactly what Edge sent via Dev Tools - Network - select appropriate request then click "Header" etc and maybe find content causing error. developer.microsoft.com/en-us/microsoft-edge/platform/issues/… . I don't think I can add any more as my experience is limited to use of jquery Ajax.
    – scytale
    Nov 11 at 14:16











  • 2: Note. There is an occasional intermittent glitch (at least on my PC) with Edge; I can submit a URL (even for a simple page) and Dev Tools Network sometimes fails to list/record any of the resulting requests (even for simple pages).
    – scytale
    Nov 11 at 14:16










  • Can you try to provide a sample code or a detailed steps to reproduce the issue on our side? Then We can try to make a test. With only this error, it is not possible for us to find the root cause for the issue as this error can be occur due to various reasons. You can also try to make a test using other machine with MS Edge to check whether you get similar error or not. It can help to narrow down the issue.
    – Deepak-MSFT
    Nov 14 at 8:44














up vote
1
down vote













From inception Edge appears to have bee out of sync with other browser implementations for fetch (even missing some native methods).



Issues: 24 Aug 2018 "Fetch Api post not working in latest version of edge" (not fixed). I'm not sure if this has the same root as your issue. One contributor solved problem for them by ensuring body is string e.g.



body: urlParams(
username: this.state.username,
password: this.state.password,
_csrf: token
).toString()


A report of 400 fetch issue in 2016 was referred on to an issue identifying another Edge feature "It looks like we put LEFT-TO-RIGHT MARK (U+200E) around punctuation marks, but Chrome and Firefox don't."



In Edge dev tools (F12) check console log for JS errors; and under Network check what you are actually sending to your server.






share|improve this answer




















  • Thanks. I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same. So the GET request doesn't use body at all as far as I understand..
    – Aurimas
    Nov 11 at 13:02











  • 1: If actual status 400 then by implication your server got the request. I guess you should be able to see exactly what Edge sent via Dev Tools - Network - select appropriate request then click "Header" etc and maybe find content causing error. developer.microsoft.com/en-us/microsoft-edge/platform/issues/… . I don't think I can add any more as my experience is limited to use of jquery Ajax.
    – scytale
    Nov 11 at 14:16











  • 2: Note. There is an occasional intermittent glitch (at least on my PC) with Edge; I can submit a URL (even for a simple page) and Dev Tools Network sometimes fails to list/record any of the resulting requests (even for simple pages).
    – scytale
    Nov 11 at 14:16










  • Can you try to provide a sample code or a detailed steps to reproduce the issue on our side? Then We can try to make a test. With only this error, it is not possible for us to find the root cause for the issue as this error can be occur due to various reasons. You can also try to make a test using other machine with MS Edge to check whether you get similar error or not. It can help to narrow down the issue.
    – Deepak-MSFT
    Nov 14 at 8:44












up vote
1
down vote










up vote
1
down vote









From inception Edge appears to have bee out of sync with other browser implementations for fetch (even missing some native methods).



Issues: 24 Aug 2018 "Fetch Api post not working in latest version of edge" (not fixed). I'm not sure if this has the same root as your issue. One contributor solved problem for them by ensuring body is string e.g.



body: urlParams(
username: this.state.username,
password: this.state.password,
_csrf: token
).toString()


A report of 400 fetch issue in 2016 was referred on to an issue identifying another Edge feature "It looks like we put LEFT-TO-RIGHT MARK (U+200E) around punctuation marks, but Chrome and Firefox don't."



In Edge dev tools (F12) check console log for JS errors; and under Network check what you are actually sending to your server.






share|improve this answer












From inception Edge appears to have bee out of sync with other browser implementations for fetch (even missing some native methods).



Issues: 24 Aug 2018 "Fetch Api post not working in latest version of edge" (not fixed). I'm not sure if this has the same root as your issue. One contributor solved problem for them by ensuring body is string e.g.



body: urlParams(
username: this.state.username,
password: this.state.password,
_csrf: token
).toString()


A report of 400 fetch issue in 2016 was referred on to an issue identifying another Edge feature "It looks like we put LEFT-TO-RIGHT MARK (U+200E) around punctuation marks, but Chrome and Firefox don't."



In Edge dev tools (F12) check console log for JS errors; and under Network check what you are actually sending to your server.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 11 at 7:38









scytale

846711




846711











  • Thanks. I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same. So the GET request doesn't use body at all as far as I understand..
    – Aurimas
    Nov 11 at 13:02











  • 1: If actual status 400 then by implication your server got the request. I guess you should be able to see exactly what Edge sent via Dev Tools - Network - select appropriate request then click "Header" etc and maybe find content causing error. developer.microsoft.com/en-us/microsoft-edge/platform/issues/… . I don't think I can add any more as my experience is limited to use of jquery Ajax.
    – scytale
    Nov 11 at 14:16











  • 2: Note. There is an occasional intermittent glitch (at least on my PC) with Edge; I can submit a URL (even for a simple page) and Dev Tools Network sometimes fails to list/record any of the resulting requests (even for simple pages).
    – scytale
    Nov 11 at 14:16










  • Can you try to provide a sample code or a detailed steps to reproduce the issue on our side? Then We can try to make a test. With only this error, it is not possible for us to find the root cause for the issue as this error can be occur due to various reasons. You can also try to make a test using other machine with MS Edge to check whether you get similar error or not. It can help to narrow down the issue.
    – Deepak-MSFT
    Nov 14 at 8:44
















  • Thanks. I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same. So the GET request doesn't use body at all as far as I understand..
    – Aurimas
    Nov 11 at 13:02











  • 1: If actual status 400 then by implication your server got the request. I guess you should be able to see exactly what Edge sent via Dev Tools - Network - select appropriate request then click "Header" etc and maybe find content causing error. developer.microsoft.com/en-us/microsoft-edge/platform/issues/… . I don't think I can add any more as my experience is limited to use of jquery Ajax.
    – scytale
    Nov 11 at 14:16











  • 2: Note. There is an occasional intermittent glitch (at least on my PC) with Edge; I can submit a URL (even for a simple page) and Dev Tools Network sometimes fails to list/record any of the resulting requests (even for simple pages).
    – scytale
    Nov 11 at 14:16










  • Can you try to provide a sample code or a detailed steps to reproduce the issue on our side? Then We can try to make a test. With only this error, it is not possible for us to find the root cause for the issue as this error can be occur due to various reasons. You can also try to make a test using other machine with MS Edge to check whether you get similar error or not. It can help to narrow down the issue.
    – Deepak-MSFT
    Nov 14 at 8:44















Thanks. I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same. So the GET request doesn't use body at all as far as I understand..
– Aurimas
Nov 11 at 13:02





Thanks. I'm getting HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax in console. Nothing in request seems to be bad. I rewrote the same request to use POST instead of get, but result is the same. So the GET request doesn't use body at all as far as I understand..
– Aurimas
Nov 11 at 13:02













1: If actual status 400 then by implication your server got the request. I guess you should be able to see exactly what Edge sent via Dev Tools - Network - select appropriate request then click "Header" etc and maybe find content causing error. developer.microsoft.com/en-us/microsoft-edge/platform/issues/… . I don't think I can add any more as my experience is limited to use of jquery Ajax.
– scytale
Nov 11 at 14:16





1: If actual status 400 then by implication your server got the request. I guess you should be able to see exactly what Edge sent via Dev Tools - Network - select appropriate request then click "Header" etc and maybe find content causing error. developer.microsoft.com/en-us/microsoft-edge/platform/issues/… . I don't think I can add any more as my experience is limited to use of jquery Ajax.
– scytale
Nov 11 at 14:16













2: Note. There is an occasional intermittent glitch (at least on my PC) with Edge; I can submit a URL (even for a simple page) and Dev Tools Network sometimes fails to list/record any of the resulting requests (even for simple pages).
– scytale
Nov 11 at 14:16




2: Note. There is an occasional intermittent glitch (at least on my PC) with Edge; I can submit a URL (even for a simple page) and Dev Tools Network sometimes fails to list/record any of the resulting requests (even for simple pages).
– scytale
Nov 11 at 14:16












Can you try to provide a sample code or a detailed steps to reproduce the issue on our side? Then We can try to make a test. With only this error, it is not possible for us to find the root cause for the issue as this error can be occur due to various reasons. You can also try to make a test using other machine with MS Edge to check whether you get similar error or not. It can help to narrow down the issue.
– Deepak-MSFT
Nov 14 at 8:44




Can you try to provide a sample code or a detailed steps to reproduce the issue on our side? Then We can try to make a test. With only this error, it is not possible for us to find the root cause for the issue as this error can be occur due to various reasons. You can also try to make a test using other machine with MS Edge to check whether you get similar error or not. It can help to narrow down the issue.
– Deepak-MSFT
Nov 14 at 8:44

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53240308%2fwhy-do-i-get-400-bad-request-in-edge-browser-only-with-fetch%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo