Skip to content

Commit

Permalink
Merge pull request #29 from planningcenter/7m/json-request
Browse files Browse the repository at this point in the history
fix(Request): Faraday request not sending JSON properly
  • Loading branch information
seven1m authored Apr 24, 2024
2 parents d0a30b7 + fb1ec94 commit 5533301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.1.1 (April 24, 2024)

- Fix: Tell Faraday to use JSON for the request

# 2.1.0 (April 14, 2023)

- Chore: Use 2.x version of Faraday
Expand Down
1 change: 1 addition & 0 deletions lib/pco/api/endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def _build_endpoint(path)

def _build_connection
Faraday.new(url: url) do |faraday|
faraday.request :json
faraday.response :json, content_type: /\bjson$/
if @basic_auth_token && @basic_auth_secret
faraday.request :authorization, :basic, @basic_auth_token, @basic_auth_secret
Expand Down

0 comments on commit 5533301

Please sign in to comment.