chore:Use http constants as http.request parameters

Signed-off-by: xin.li <xin.li@daocloud.io>
pull/11832/head
xin.li 1 year ago
parent b789d8677d
commit 8a310c5a98

@ -114,7 +114,7 @@ func (c *Client) Search(term string) ([]SearchResult, error) {
p.RawQuery = "q=" + url.QueryEscape(term)
// Create request
req, err := http.NewRequest("GET", p.String(), nil)
req, err := http.NewRequest(http.MethodGet, p.String(), nil)
if err != nil {
return nil, err
}

Loading…
Cancel
Save