You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -991,6 +991,48 @@ client = OAuth2::Client.new(
991
991
end
992
992
```
993
993
994
+
##### Using flat query params (Faraday::FlatParamsEncoder)
995
+
996
+
Some APIs expect repeated key parameters to be sent as flat params rather than arrays. Faraday provides FlatParamsEncoder for this purpose. You can configure the oauth2 client to use it when building requests.
997
+
998
+
```ruby
999
+
require"faraday"
1000
+
1001
+
client =OAuth2::Client.new(
1002
+
id,
1003
+
secret,
1004
+
site:"https://api.example.com",
1005
+
# Pass Faraday connection options to make FlatParamsEncoder the default
0 commit comments