mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 03:13:13 +00:00
oracle: send user-agent header with our requests, fix #1923
This commit is contained in:
parent
bde4e6a91f
commit
3402a3ec30
3 changed files with 11 additions and 4 deletions
|
@ -327,8 +327,8 @@ type (
|
|||
)
|
||||
|
||||
// Get implements oracle.HTTPClient interface.
|
||||
func (c *httpClient) Get(url string) (*http.Response, error) {
|
||||
resp, ok := c.responses[url]
|
||||
func (c *httpClient) Do(req *http.Request) (*http.Response, error) {
|
||||
resp, ok := c.responses[req.URL.String()]
|
||||
if ok {
|
||||
return &http.Response{
|
||||
StatusCode: resp.code,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue