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:
nil (if the HTTP response has no body),
String,
Array[Array[untyped]], or
Hash.
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'.
In the file
httparty.rbs
, the methodparsed_response
is inaccurately documented to return a string. However, upon examining the source code, it's clear that theparsed_response
method's return type is determined by the Content-Type header of the HTTP response. The potential return types include:nil
(if the HTTP response has no body),String
,Array[Array[untyped]]
, orHash
.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'.