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

the post method uses the :query option instead of :body #25

Open
etalley opened this issue May 9, 2016 · 4 comments
Open

the post method uses the :query option instead of :body #25

etalley opened this issue May 9, 2016 · 4 comments

Comments

@etalley
Copy link

etalley commented May 9, 2016

https://github.com/Pardot/ruby-pardot/blob/master/lib/pardot/http.rb#L19

check_response self.class.post(full_path, :query => params)

should be

check_response self.class.post(full_path, :body => params)

@etalley
Copy link
Author

etalley commented May 9, 2016

sending an email template over the wire doesn't work due to length limitations on the API.
https://boutell.com/newfaq/misc/urllength.html using body parameters solves this issue. the API seems to handle query and body params transparently.

@andrewtch
Copy link

Upvote! Can you fix that?

@CerebusTV
Copy link

We had this problem as well. Created PR to address. Includes optional parameter to send the params as the body to maintain backward compatibility. The PR is below:

#33

@alistairholt
Copy link

Same problem here. The Pardot API returns a 400 "Your browser sent an invalid request" error when passing large strings via query. Switching to body fixed the issue. Frustrating!

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

4 participants