Skip to content

Commit

Permalink
Wrong first type of parameter given to NewHTTPRequest function
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwiterrion authored Mar 18, 2024
1 parent 09a3a92 commit 4caec41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 4caec41

Please sign in to comment.