mirror of https://github.com/ceph/go-ceph
rgw/admin: remove unnecessary type
Now that we use http.Method* constant from the http package, we don't need to have verbHTTP type anymore. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
42a9620c93
commit
401fbe9698
|
@ -33,8 +33,6 @@ type HTTPClient interface {
|
|||
Do(req *http.Request) (*http.Response, error)
|
||||
}
|
||||
|
||||
type verbHTTP string
|
||||
|
||||
// API struct for New Client
|
||||
type API struct {
|
||||
AccessKey string
|
||||
|
@ -76,9 +74,9 @@ func New(endpoint, accessKey, secretKey string, httpClient HTTPClient) (*API, er
|
|||
}
|
||||
|
||||
// call makes request to the RGW Admin Ops API
|
||||
func (api *API) call(ctx context.Context, verb verbHTTP, path string, args url.Values) (body []byte, err error) {
|
||||
func (api *API) call(ctx context.Context, httpMethod, path string, args url.Values) (body []byte, err error) {
|
||||
// Build request
|
||||
request, err := http.NewRequestWithContext(ctx, string(verb), buildQueryPath(api.Endpoint, path, args.Encode()), nil)
|
||||
request, err := http.NewRequestWithContext(ctx, httpMethod, buildQueryPath(api.Endpoint, path, args.Encode()), nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue