Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load resource: the server responded with a status of 405 (Method Not Allowed) ? #46

Open
mfhsieh opened this issue Feb 16, 2014 · 1 comment

Comments

@mfhsieh
Copy link

mfhsieh commented Feb 16, 2014

I have create my client id (include Books and Contacts API, InitPoint = http://127.0.0.1:3030), and modify "oauth_example.dart" as the following code. But I got error message:
Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
https://www.google.com/m8/feeds/contacts/default/full
Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:3030' is therefore not allowed access.
https://www.google.com/m8/feeds/contacts/default/full
XMLHttpRequest cannot load https://www.google.com/m8/feeds/contacts/default/full. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:3030' is therefore not allowed access.

......
void main() {
  // use your own Client ID from the API Console here
  final auth = new GoogleOAuth2(
      "THIS IS MY CLIENT ID",
      ["https://www.googleapis.com/auth/books", "https://www.google.com/m8/feeds" ]);

  ......
}

Future _oauthReady(Token token) {
  ......
  //final url = "https://www.googleapis.com/books/v1/volumes/zyTCAlFPjgYC";
  final url = "https://www.google.com/m8/feeds/contacts/default/full";
  ......
}
@adam-singer
Copy link
Member

I don't have the bandwidth to track this issue at the moment. The Access-Control-Allow-Origin are tricky, I've not been able to figure out why some APIs throw this error and others do not. Maybe something like http://progrium.com/localtunnel/ would aid in development?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants