diff --git a/README.md b/README.md index b8ac899..dd5de86 100644 --- a/README.md +++ b/README.md @@ -215,13 +215,13 @@ extism call plugin.wasm log_stuff --wasi --log-level=trace ## HTTP -Sometimes it is useful to let a plug-in [make HTTP calls](https://pkg.go.dev/github.com/extism/go-pdk#HTTPRequest.Send). [See this example](example/http.go) +Sometimes it is useful to let a plug-in [make HTTP calls](https://pkg.go.dev/github.com/extism/go-pdk#HTTPRequest.Send). [See this example](example/http/tiny_main.go) ```go //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())