@@ -96,6 +96,7 @@ type Client struct {
9696 HostURL string // Deprecated: use BaseURL instead. To be removed in v3.0.0 release.
9797 QueryParam url.Values
9898 FormData url.Values
99+ PathParams map [string ]string
99100 Header http.Header
100101 UserInfo * User
101102 Token string
@@ -126,7 +127,6 @@ type Client struct {
126127 debugBodySizeLimit int64
127128 outputDirectory string
128129 scheme string
129- pathParams map [string ]string
130130 log Logger
131131 httpClient * http.Client
132132 proxyURL * url.URL
@@ -385,7 +385,7 @@ func (c *Client) R() *Request {
385385 client : c ,
386386 multipartFiles : []* File {},
387387 multipartFields : []* MultipartField {},
388- pathParams : map [string ]string {},
388+ PathParams : map [string ]string {},
389389 jsonEscapeHTML : true ,
390390 }
391391 return r
@@ -814,7 +814,7 @@ func (c *Client) SetDoNotParseResponse(parse bool) *Client {
814814// Also it can be overridden at request level Path Params options,
815815// see `Request.SetPathParam` or `Request.SetPathParams`.
816816func (c * Client ) SetPathParam (param , value string ) * Client {
817- c .pathParams [param ] = value
817+ c .PathParams [param ] = value
818818 return c
819819}
820820
@@ -1080,7 +1080,7 @@ func createClient(hc *http.Client) *Client {
10801080 jsonEscapeHTML : true ,
10811081 httpClient : hc ,
10821082 debugBodySizeLimit : math .MaxInt32 ,
1083- pathParams : make (map [string ]string ),
1083+ PathParams : make (map [string ]string ),
10841084 }
10851085
10861086 // Logger
0 commit comments