lostisland / faraday

Simple, but flexible HTTP client library, with support for multiple backends.
https://lostisland.github.io/faraday
MIT License
5.72k stars 972 forks source link

Update `@param` of methods on `Connection` #1452

Closed yykamei closed 1 year ago

yykamei commented 1 year ago

Description

Methods on Connection with the name of HTTP verb, such as post, depend on run_request, and it receives the following parameters:

I think the current YARD doc could be updated to follow the implemented behavior. Especially, the URI type looks to be worth being described because the type is supported by `Request#url.

Besides, I updated the body of run_request as well as Request#body because the body will be passed to Faraday::Env#new through Request#to_env, and Faraday::Env#body seems String.

Todos

Additional Notes

Perhaps, other YARD comments could be updated, but I focused on run_request and its related methods.