updating documentation with Golang examples for custom HTTP headers

This commit is contained in:
Julien Neuhart
2019-12-09 17:26:00 +01:00
parent 1eeb5fc2b0
commit 81e7bab22a
3 changed files with 42 additions and 4 deletions

View File

@@ -124,7 +124,17 @@ $ curl --request POST \
### Go
// TODO
```golang
import "github.com/thecodingmachine/gotenberg-go-client/v6"
func main() {
c := &gotenberg.Client{Hostname: "http://localhost:3000"}
req, _ := gotenberg.NewHTMLRequest("index.html")
req.WebhookURL("http://myapp.com/webhook/")
req.AddWebhookURLHTTPHeader("Your-Header", "Foo")
resp, _ := c.Post(req)
}
```
### PHP