Questions tagged [httparty]

HTTParty is a Ruby gem written by John Nunemaker focused on the consumption of web services and APIs.

HTTParty is a Ruby gem written by John Nunemaker focused on the consumption of web services and APIs. It boasts a very readable DSL and out-of-the-box support for JSON, HTML and XML.

For more information refer to: It's an HTTParty and Everyone Is Invited!

621 questions
-1
votes
1 answer

Change in value of JSON data at receiver end

I am sending post request to facebook graph api using Httparty gem. My code is message_data ={ "recipient" => { "id" => recipient_id }, "message" => { "attachment" => { "type" =>…
Sri Harsha
  • 641
  • 2
  • 8
  • 18
-1
votes
1 answer

HTTParty : undefined method `code' error

Getting error: ./http.rb:13: undefined method `code' for # (NoMethodError) #!/usr/bin/ruby require 'rubygems' require 'httparty' class Foo include HTTParty end # Simple get with full url r = Foo.get('http://www.google.com/') p r.code
Pradeep
  • 3,093
  • 17
  • 21
-1
votes
1 answer

How does this behaviour work with Ruby and HTTParty?

I'm learning Ruby. I have some code that uses the HTTParty library to download some data. The remote server does not correctly define the content-type so the response is not parsed (as JSON) automatically. The JSON looks something like…
diolemo
  • 2,621
  • 2
  • 21
  • 28
-2
votes
1 answer

how to save the return of an api in a variable in httparty and ruby?

I'm sending a POST request in an API that returns a token, how do I assign a variable to this generated value?
-2
votes
1 answer

Body parameters in POST request with capitals

I need to send a POST request with HTTParty, in which the body parameter must be shortDescription. Should I use: payload = { :short_description => "Bla" } or: payload = { :shortDescription => "Bla" } How can I do this?
John
  • 6,404
  • 14
  • 54
  • 106
-3
votes
1 answer

I am getting false in API query with code 200 with ruby

Friends, I can't understand what's going on, I'm new to programming. #Create Employee @manter_user = Crud.new (my class) #Create $response = @manter_user.create(my method) puts "Response is: #{$response}" puts "Create…
1 2 3
41
42