@@ -102,7 +102,7 @@ type SubscribeOpts struct {
102
102
// nodes and connections and filtering message events
103
103
func (c * Client ) SubscribeNetwork (events chan * Event , opts SubscribeOpts ) (event.Subscription , error ) {
104
104
url := fmt .Sprintf ("%s/events?current=%t&filter=%s" , c .URL , opts .Current , opts .Filter )
105
- req , err := http .NewRequest ("GET" , url , nil )
105
+ req , err := http .NewRequest (http . MethodGet , url , nil )
106
106
if err != nil {
107
107
return nil , err
108
108
}
@@ -215,18 +215,18 @@ func (c *Client) RPCClient(ctx context.Context, nodeID string) (*rpc.Client, err
215
215
// Get performs a HTTP GET request decoding the resulting JSON response
216
216
// into "out"
217
217
func (c * Client ) Get (path string , out interface {}) error {
218
- return c .Send ("GET" , path , nil , out )
218
+ return c .Send (http . MethodGet , path , nil , out )
219
219
}
220
220
221
221
// Post performs a HTTP POST request sending "in" as the JSON body and
222
222
// decoding the resulting JSON response into "out"
223
223
func (c * Client ) Post (path string , in , out interface {}) error {
224
- return c .Send ("POST" , path , in , out )
224
+ return c .Send (http . MethodPost , path , in , out )
225
225
}
226
226
227
227
// Delete performs a HTTP DELETE request
228
228
func (c * Client ) Delete (path string ) error {
229
- return c .Send ("DELETE" , path , nil , nil )
229
+ return c .Send (http . MethodDelete , path , nil , nil )
230
230
}
231
231
232
232
// Send performs a HTTP request, sending "in" as the JSON request body and
0 commit comments