From 4caec41ef9f5aa7f5e9a554b64039f104df30b03 Mon Sep 17 00:00:00 2001 From: Etienne ANNE Date: Mon, 18 Mar 2024 21:35:01 +0100 Subject: [PATCH] Wrong first type of parameter given to NewHTTPRequest function --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a9d34a..dd5de86 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ Sometimes it is useful to let a plug-in [make HTTP calls](https://pkg.go.dev/git //export http_get func httpGet() int32 { // create an HTTP Request (withuot relying on WASI), set headers as needed - req := pdk.NewHTTPRequest("GET", "https://jsonplaceholder.typicode.com/todos/1") + req := pdk.NewHTTPRequest(pdk.MethodGet, "https://jsonplaceholder.typicode.com/todos/1") req.SetHeader("some-name", "some-value") req.SetHeader("another", "again") // send the request, get response back (can check status on response via res.Status())