Skip to content

Commit

Permalink
fix: remove duplicated path from query uri (#182)
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Casagrande <[email protected]>
  • Loading branch information
Anthony Casagrande authored Feb 6, 2023
1 parent 436595c commit eb00fe3
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions application-services/custom/camera-management/appcamera/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
"github.com/edgexfoundry/go-mod-core-contracts/v2/dtos/responses"
"io"
"net/http"
"net/url"
"path"
)

const (
Expand Down Expand Up @@ -52,20 +50,10 @@ func issuePostRequest(ctx context.Context, res interface{}, baseUrl string, reqP
}

func issueGetRequest(ctx context.Context, res interface{}, baseUrl string, requestPath string) (err error) {
u, err := url.Parse(baseUrl)
if err != nil {
return err
}
requestPath = path.Join(u.Path, requestPath)
return utils.GetRequest(ctx, &res, baseUrl, requestPath, nil)
}

func issueDeleteRequest(ctx context.Context, res interface{}, baseUrl string, requestPath string) (err error) {
u, err := url.Parse(baseUrl)
if err != nil {
return err
}
requestPath = path.Join(u.Path, requestPath)
return utils.DeleteRequest(ctx, &res, baseUrl, requestPath)
}

Expand Down

0 comments on commit eb00fe3

Please sign in to comment.