Skip to content

Conversation

@roperzh
Copy link

@roperzh roperzh commented Sep 16, 2014

Hello,

First of all thanks for this awesome & super-simple library.

Actually, some of the endpoints in the freshbooks API doesn't require any parameters, for example staff.current.

Currently the xml request for this:

freshbooks.call("staff.current", {}, function(err, response) {
  console.log(response);
});

Is formatted like this:

<?xml version='1.0' encoding='utf-8'?>
<request />

And the API returns:

{ response: { error: 'Your XML is not formatted correctly.', code: '40010' } }

With this simple change you can pass empty objects or even null as a second argument to Freshbooks#call.

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

Successfully merging this pull request may close these issues.

1 participant