Skip to content

Commit

Permalink
add query params
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajiv Geraev committed Feb 7, 2020
1 parent 3615903 commit 5a188bb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sms.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,17 @@ func (c *SMS) MessageStatus(msg *MessageStatusRequest) (*MessageStatusResponse,
r *http.Request
err error
)
r, err = http.NewRequest("GET", apiRoot+"/search/message/"+msg.apiKey+"/"+msg.apiSecret+"/"+msg.ID, nil)
r, err = http.NewRequest("GET", apiRoot+"/search/message", nil)
if err != nil {
return nil, err
}

q := r.URL.Query()
q.Add("api_key", msg.apiKey)
q.Add("api_secret", msg.apiSecret)
q.Add("id", msg.ID)
r.URL.RawQuery = q.Encode()

r.Header.Add("Accept", "application/json")

var resp *http.Response
Expand Down

0 comments on commit 5a188bb

Please sign in to comment.