Skip to content

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

@mfhsieh

Description

@mfhsieh

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";
  ......
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions