forked from forgejo/forgejo
parent
226fa396df
commit
a47a1e0777
3 changed files with 59 additions and 268 deletions
|
@ -88,7 +88,10 @@ func newJSONRequest[T any](pc payloadConvertor[T], w *webhook_model.Webhook, t *
|
|||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
return newJSONRequestWithPayload(payload, w, t, withDefaultHeaders)
|
||||
}
|
||||
|
||||
func newJSONRequestWithPayload(payload any, w *webhook_model.Webhook, t *webhook_model.HookTask, withDefaultHeaders bool) (*http.Request, []byte, error) {
|
||||
body, err := json.MarshalIndent(payload, "", " ")
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue