Giter Club home page Giter Club logo

Comments (7)

sandro avatar sandro commented on September 23, 2024

I'll happily accept documentation contributions! Next time you open the gem to figure something out, write some comments about it above the method and send it my way.

from httparty.

bananastalktome avatar bananastalktome commented on September 23, 2024

I wrote up some basic documentation for HTTParty at http://gist.github.com/422500 which might be useful. Please feel free to format & add it to the Wiki here, or simply ignore it if it isn't up to snuff :)

from httparty.

nathany avatar nathany commented on September 23, 2024

Wow, I thought HTTParty wasn't working correctly because :body wasn't automagically parsed for JSON/XML... sometime later I discovered parsed_response. +1 better docs

from httparty.

sandro avatar sandro commented on September 23, 2024

@nathany Agh, the HTTParty::Response object should display the parsed_response by default. The fact that you had to use parsed_response tells me something went wrong. Can you please post a code snippet?

from httparty.

nathany avatar nathany commented on September 23, 2024

Oh, perhaps it does work. I was using .body before, which is always the raw text? Sorry, misread the basic.rb example. This seems to be working:
result = {}
r = HTTParty.get(url, :query => payload)
r.each {|k,v| result[k.downcase.to_sym] = v}
result

from httparty.

sandro avatar sandro commented on September 23, 2024

HTTParty::Response#body used to return the parsed response but in an attempt to make the response object act more like a regular NetHTTP response object, #body now returns the raw body. It looks like I should renamed parsed_response to parsed_body for consistency sake. Thanks for the input.

from httparty.

davekapp avatar davekapp commented on September 23, 2024

I'm interested in helping with contributing documentation but I'm relatively new to the workflow used for GitHub. If I add some documentation, how should I present it / send it to you? (And by "you" I mean "the cool people behind this really neat gem" :) )

from httparty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.