From 044e297413066262c54beb33e98d0e498178897b Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Tue, 21 Jul 2026 14:23:40 +0200 Subject: use http.MethodFoo constants where possible --- bulk.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bulk.go') diff --git a/bulk.go b/bulk.go index a21f199..7c08345 100644 --- a/bulk.go +++ b/bulk.go @@ -76,7 +76,7 @@ func (a *Account) BulkUpload(ctx context.Context, uploadPath string, format Bulk } req := Request{ - Method: "PUT", + Method: http.MethodPut, Body: contents, Options: cloneRequestOptions(opts, nil), ExpectStatusCodes: []int{200}, @@ -259,7 +259,7 @@ func (a *Account) bulkDeleteSingle(ctx context.Context, objects []*Object, conta // account.Capabilities.BulkDelete.MaximumDeletesPerRequest`. func (a *Account) bulkDelete(ctx context.Context, names []string, opts *RequestOptions) (numDeleted, numNotFound int, err error) { req := Request{ - Method: "DELETE", + Method: http.MethodDelete, Body: strings.NewReader(strings.Join(names, "\n") + "\n"), Options: cloneRequestOptions(opts, nil), ExpectStatusCodes: []int{200}, -- cgit v1.3.1