dispatcher

package
v0.0.0-...-e300724 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher struct {
	// contains filtered or unexported fields
}

Dispatcher struct

func NewDispatcher

func NewDispatcher(hooks webhooks.RegisteredWebhooks) *Dispatcher

NewDispatcher new dispatcher

func (*Dispatcher) HandleRequest

func (d *Dispatcher) HandleRequest(w http.ResponseWriter, r *http.Request)

HandleRequest http request HTTP status code usage: When the request body is correctly parsed into a request (utils.ParseHTTPRequest) then we should always send 200 OK and use the response body (response.status.code) to indicate a problem. When instead there's a problem with the HTTP request itself (404, an inability to parse a request, or some internal problem) it is appropriate to use the HTTP status code to communicate.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL