Skip to content

Commit

Permalink
Update connection.rb documentation (#1482)
Browse files Browse the repository at this point in the history
Updates connection.rb documentation with PUT example
  • Loading branch information
wlads authored Jan 16, 2023
1 parent bf3ed11 commit f26715c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/faraday/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,13 @@ def options(*args)
# @param headers [Hash, nil] unencoded HTTP header key/value pairs.
#
# @example
# # TODO: Make it a PUT example
# conn.post '/items', data, content_type: 'application/json'
# conn.put '/products/123', data, content_type: 'application/json'
#
# # Simple ElasticSearch indexing sample.
# conn.post '/twitter/tweet' do |req|
# req.headers[:content_type] = 'application/json'
# req.params[:routing] = 'kimchy'
# req.body = JSON.generate(user: 'kimchy', ...)
# # Star a gist.
# conn.put 'https://api.github.com/gists/GIST_ID/star' do |req|
# req.headers['Accept'] = 'application/vnd.github+json'
# req.headers['Authorization'] = 'Bearer <YOUR-TOKEN>'
# req.headers['X-GitHub-Api-Version'] = '2022-11-28'
# end
#
# @yield [Faraday::Request] for further request customizations
Expand Down

0 comments on commit f26715c

Please sign in to comment.