(ep string, args map[string]string)
| 105 | } |
| 106 | |
| 107 | func (c *httpClient) URL(ep string, args map[string]string) *url.URL { |
| 108 | p := path.Join(c.endpoint.Path, ep) |
| 109 | |
| 110 | for arg, val := range args { |
| 111 | arg = ":" + arg |
| 112 | p = strings.ReplaceAll(p, arg, val) |
| 113 | } |
| 114 | |
| 115 | u := *c.endpoint |
| 116 | u.Path = p |
| 117 | |
| 118 | return &u |
| 119 | } |
| 120 | |
| 121 | func (c *httpClient) Do(ctx context.Context, req *http.Request) (*http.Response, []byte, error) { |
| 122 | if ctx != nil { |
no outgoing calls