0

I'm trying to implement a simple POST call in meteor.js to the Google Calendar API, and I'm stuck. My request looks like this:

var id = Meteor.http.post("https://www.googleapis.com/calendar/v3/calendars/", {
    'headers' : { 
      'Authorization': auth, // auth = "Bearer " + Meteor.user().services.google.accessToken
      'Content-Type': 'application/json' 
    },
    'parameters': {},
    'body' : { 
      'title': "Calendar Title",
    }
  });

and I get the following error:

Error: failed [400] {
    "error": {
        "errors": [{
            "domain": "global",
            "reason": "required",
            "message": "Missing title."
        }],
    "code": 400,
    "message": "Missing title."
    }
}

Any ideas?

1 Answer 1

0

Solved it. This is dumb.

Take out parameters, and make "body" "data" instead and it works.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.