@@ -10,6 +10,7 @@ import (
1010 "crypto/tls"
1111 "crypto/x509"
1212 "encoding/json"
13+ "encoding/xml"
1314 "errors"
1415 "fmt"
1516 "io"
@@ -114,6 +115,8 @@ type Client struct {
114115 RetryAfter RetryAfterFunc
115116 JSONMarshal func (v interface {}) ([]byte , error )
116117 JSONUnmarshal func (data []byte , v interface {}) error
118+ XMLMarshal func (v interface {}) ([]byte , error )
119+ XMLUnmarshal func (data []byte , v interface {}) error
117120
118121 // HeaderAuthorizationKey is used to set/access Request Authorization header
119122 // value when `SetAuthToken` option is used.
@@ -1074,13 +1077,16 @@ func createClient(hc *http.Client) *Client {
10741077 Cookies : make ([]* http.Cookie , 0 ),
10751078 RetryWaitTime : defaultWaitTime ,
10761079 RetryMaxWaitTime : defaultMaxWaitTime ,
1080+ PathParams : make (map [string ]string ),
10771081 JSONMarshal : json .Marshal ,
10781082 JSONUnmarshal : json .Unmarshal ,
1083+ XMLMarshal : xml .Marshal ,
1084+ XMLUnmarshal : xml .Unmarshal ,
10791085 HeaderAuthorizationKey : http .CanonicalHeaderKey ("Authorization" ),
1080- jsonEscapeHTML : true ,
1081- httpClient : hc ,
1082- debugBodySizeLimit : math . MaxInt32 ,
1083- PathParams : make ( map [ string ] string ) ,
1086+
1087+ jsonEscapeHTML : true ,
1088+ httpClient : hc ,
1089+ debugBodySizeLimit : math . MaxInt32 ,
10841090 }
10851091
10861092 // Logger
0 commit comments