ruby / gem_rbs_collection

A collection of RBS for gems.
MIT License
247 stars 101 forks source link

Definition of 'parsed_response' method in httparty.rbs is wrong. #466

Open andredriem opened 8 months ago

andredriem commented 8 months ago

In the file httparty.rbs, the method parsed_response is inaccurately documented to return a string. However, upon examining the source code, it's clear that the parsed_response method's return type is determined by the Content-Type header of the HTTP response. The potential return types include:

It's important to note that users have the ability to override the parser, as illustrated in the code documentation. This flexibility allows for a variety of user-defined return types, making this a potentially common scenario. Given this recommended usage of the API, it would be wise to change the return type of 'parsed_response' to 'Object'.