blob: 01c9a8d56bb617e4f5a330d99985ada462212e14 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package api
import "net/http"
// Optional interfaces for request type
//WithHeader sets headers to request
type WithHeader interface {
WithHeader(header http.Header)
}
//WithMethod sets method to request
type WithMethod interface {
WithMethod(method string)
}
// Optional interfaces for response type
//Renderer renders response to byte slice
type Renderer interface {
Render() ([]byte, error)
}
//WithContentType returns custom content type for response
type WithContentType interface {
ContentType() string
}
//WithHTTPStatus returns custom status code
type WithHTTPStatus interface {
Status() int
}
|