mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-07 01:50:46 +00:00
client-go/rest: move content type wiring from client to request
Signed-off-by: Monis Khan <mok@microsoft.com> Kubernetes-commit: fe1eda0649fdb6a15200d279be214c67246d3b12
This commit is contained in:
committed by
Kubernetes Publisher
parent
c5146a9031
commit
1647efd5c4
@@ -105,10 +105,6 @@ type RESTClient struct {
|
||||
// NewRESTClient creates a new RESTClient. This client performs generic REST functions
|
||||
// such as Get, Put, Post, and Delete on specified paths.
|
||||
func NewRESTClient(baseURL *url.URL, versionedAPIPath string, config ClientContentConfig, rateLimiter flowcontrol.RateLimiter, client *http.Client) (*RESTClient, error) {
|
||||
if len(config.ContentType) == 0 {
|
||||
config.ContentType = "application/json"
|
||||
}
|
||||
|
||||
base := *baseURL
|
||||
if !strings.HasSuffix(base.Path, "/") {
|
||||
base.Path += "/"
|
||||
|
Reference in New Issue
Block a user