Skip to content

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

Open

Description

@etalley

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)

Activity

  1. etalley commented on May 9, 2016

    @etalley
    Author

    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.

  2. andrewtch commented on Aug 9, 2017

    @andrewtch

    Upvote! Can you fix that?

  3. CerebusTV commented on Aug 22, 2017

    @CerebusTV

    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

  4. alistairholt commented on Nov 7, 2018

    @alistairholt

    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

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