Skip to content

Commit

Permalink
fix: double slash
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbakker committed Nov 10, 2022
1 parent a92078e commit d659a47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sendcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (e *Error) Error() string {
return fmt.Sprintf("request %s resulted in error code %d: %s", e.Request, e.Code, e.Message)
}

//Send a request to Sendcloud with given method, path, payload and credentials
// Send a request to Sendcloud with given method, path, payload and credentials
func Request(method string, uri string, payload Payload, apiKey string, apiSecret string, r Response) error {
client := http.Client{
Timeout: 10 * time.Second,
Expand Down Expand Up @@ -94,13 +94,13 @@ func Request(method string, uri string, payload Payload, apiKey string, apiSecre
return err
}

//Return the full URL
// Return the full URL
func getUrl(uri string) string {
var url string
if strings.HasPrefix(uri, "https://") {
url = uri
} else {
url = "https://panel.sendcloud.sc/" + uri
url = "https://panel.sendcloud.sc" + uri
}

return url
Expand Down

0 comments on commit d659a47

Please sign in to comment.