Looking for ?

Translate

Solved - XMLHttpRequest error in Flutter Android studio

When you try to run your flutter code project in web browser like chrome, you might face error (XMLHttpRequest error), That is coursed by Access-control-allow-origin in your browser, 



SOLUTION, 

If you are using PHP as your server code, add the below two lines of code at the beginning of your code

header("Access-Control-Allow-Origin: *");

header("Access-Control-Allow-Headers: *");


SHARE THIS POST

About Wakabia

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment