Skip to content

Commit b85452f

Browse files
authored
Fix SetRawPathParam doc
1 parent c639081 commit b85452f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ func (c *Client) SetPathParams(params map[string]string) *Client {
19521952
// client.SetRawPathParam("path", "groups/developers")
19531953
//
19541954
// Result:
1955-
// URL - /v1/users/{userId}/details
1955+
// URL - /v1/users/{path}/details
19561956
// Composed URL - /v1/users/groups/developers/details
19571957
//
19581958
// It replaces the value of the key while composing the request URL.

request.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ func (r *Request) SetResponseBodyUnlimitedReads(b bool) *Request {
766766
// client.R().SetPathParam("path", "groups/developers")
767767
//
768768
// Result:
769-
// URL - /v1/users/{userId}/details
769+
// URL - /v1/users/{path}/details
770770
// Composed URL - /v1/users/groups%2Fdevelopers/details
771771
//
772772
// It replaces the value of the key while composing the request URL.
@@ -805,16 +805,16 @@ func (r *Request) SetPathParams(params map[string]string) *Request {
805805
// SetRawPathParam method sets a single URL path key-value pair in the
806806
// Resty current request instance without path escape.
807807
//
808-
// client.R().SetPathParam("userId", "[email protected]")
808+
// client.R().SetRawPathParam("userId", "[email protected]")
809809
//
810810
// Result:
811811
// URL - /v1/users/{userId}/details
812812
// Composed URL - /v1/users/[email protected]/details
813813
//
814-
// client.R().SetPathParam("path", "groups/developers")
814+
// client.R().SetRawPathParam("path", "groups/developers")
815815
//
816816
// Result:
817-
// URL - /v1/users/{userId}/details
817+
// URL - /v1/users/{path}/details
818818
// Composed URL - /v1/users/groups/developers/details
819819
//
820820
// It replaces the value of the key while composing the request URL.

0 commit comments

Comments
 (0)