mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-07-02 08:27:41 +08:00
chore: minor refactor of webhook module
This commit is contained in:
@@ -16,9 +16,9 @@ import (
|
||||
type client struct {
|
||||
url string
|
||||
method string
|
||||
errorURL string
|
||||
errorUrl string
|
||||
errorMethod string
|
||||
extraHTTPHeaders map[string]string
|
||||
extraHttpHeaders map[string]string
|
||||
startTime time.Time
|
||||
|
||||
client *retryablehttp.Client
|
||||
@@ -29,7 +29,7 @@ type client struct {
|
||||
func (c client) send(body io.Reader, headers map[string]string, erroed bool) error {
|
||||
URL := c.url
|
||||
if erroed {
|
||||
URL = c.errorURL
|
||||
URL = c.errorUrl
|
||||
}
|
||||
|
||||
method := c.method
|
||||
@@ -45,7 +45,7 @@ func (c client) send(body io.Reader, headers map[string]string, erroed bool) err
|
||||
req.Header.Set("User-Agent", "Gotenberg")
|
||||
|
||||
// Extra HTTP headers are the custom headers from the user.
|
||||
for key, value := range c.extraHTTPHeaders {
|
||||
for key, value := range c.extraHttpHeaders {
|
||||
req.Header.Set(key, value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user