Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

POSTing to API with query in the request body is returning no response #5

Closed
paulspringett opened this Issue · 4 comments

2 participants

@paulspringett

This line in lib/eventbright/main.rb (https://github.com/therabidbanana/eventbrite/blob/master/lib/eventbrite/main.rb#L28)

response = API.do_post("/#{function}", :body => opts)

fails to return a response. Changing it to use query parameters like this:

response = API.do_post("/#{function}", :query => opts)

works though.

I'm using version 0.2.3 with ruby 1.9.2p180

@therabidbanana

This is possibly related to the HTTParty version (those opts are passed through to HTTParty post) what gem version is that?

@paulspringett

@therabidbanana our Gemfile.lock has:

httparty (0.7.7)
  crack (= 0.1.8)

Is seems odd to send a POST instead of a GET request for retrieving data from an API. Is there a good reason for it in this case?

Thanks

@therabidbanana

Honestly, I'm not sure there is a good reason. I haven't dealt with the eventbrite api for well over a year. I wouldn't be surprised if the initial reason was that Eventbrite's api was broken and only allowed POST requests. When I started this gem their API was in pretty sad shape. It's since been substantially improved, but I haven't kept up with the updates since I only needed this gem for a small project that abandoned all eventbrite integration anyway.

Maybe what happened is they changed their api a bit so that it doesn't support POSTs in the way I initially wrote. They have a more up to date client available at https://github.com/ryanjarvinen/eventbrite-client.rb which is probably safer to use moving forward (since it's maintained by one of their developers), but I'll take a look into fixing this issue and maybe cleaning up this code a bit.

@paulspringett

Thanks for the reply. Their API has certainly been "interesting" to work with! I may move over to using the other ruby client at some point when time allows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.