Commit 2a2549f
committed
Drop /api/v4 suffix from site parameter documentation
Due to the change in ruby-oauth/oauth2#469 to
fix relative URLs, linchus#22
was updated to drop the `api/v4` suffix from the `site` parameter. This
was needed since `oauth/authorize` is the new default parameter, and
omitting a leading slash makes a big difference.
Current:
```
Faraday.new('https://gitlab.example.com').build_url('oauth/authorize').to_s
=> "https://gitlab.example.com/oauth/authorize"
```
However, if you leave the `api/v4` suffix, you get the wrong URL:
```
Faraday.new('https://gitlab.example.com/api/v4').build_url('oauth/authorize').to_s
=> "https://gitlab.example.com/api/v4/oauth/authorize"
```
Notice a leading slash also works:
```
Faraday.new('https://gitlab.example.com/api/v4').build_url('/oauth/authorize').to_s
=> "https://gitlab.example.com/oauth/authorize"
```1 parent 39ad1f9 commit 2a2549f
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments