@@ -102,7 +102,7 @@ type SubscribeOpts struct {
102102// nodes and connections and filtering message events
103103func (c * Client ) SubscribeNetwork (events chan * Event , opts SubscribeOpts ) (event.Subscription , error ) {
104104 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 )
106106 if err != nil {
107107 return nil , err
108108 }
@@ -215,18 +215,18 @@ func (c *Client) RPCClient(ctx context.Context, nodeID string) (*rpc.Client, err
215215// Get performs a HTTP GET request decoding the resulting JSON response
216216// into "out"
217217func (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 )
219219}
220220
221221// Post performs a HTTP POST request sending "in" as the JSON body and
222222// decoding the resulting JSON response into "out"
223223func (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 )
225225}
226226
227227// Delete performs a HTTP DELETE request
228228func (c * Client ) Delete (path string ) error {
229- return c .Send ("DELETE" , path , nil , nil )
229+ return c .Send (http . MethodDelete , path , nil , nil )
230230}
231231
232232// Send performs a HTTP request, sending "in" as the JSON request body and
0 commit comments