/
response.go
104 lines (70 loc) · 1.5 KB
/
response.go
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
package server
import (
"codnect.io/procyon-web/http"
"io"
stdhttp "net/http"
)
type Response struct {
responseWriter stdhttp.ResponseWriter
ctx http.Context
writer io.Writer
}
func (r *Response) WithWriter(writer io.Writer) http.Response {
if writer == nil {
panic("nil writer")
}
copyResponse := new(Response)
*copyResponse = *r
copyResponse.writer = writer
return copyResponse
}
func (r *Response) Context() http.Context {
return r.ctx
}
func (r *Response) AddCookie(cookie *http.Cookie) {
}
func (r *Response) ContentLength() int {
return 0
}
func (r *Response) SetContentLength(len int) {
}
func (r *Response) CharacterEncoding() string {
return ""
}
func (r *Response) SetCharacterEncoding(charset string) {
}
func (r *Response) ContentType() string {
return ""
}
func (r *Response) SetContentType(contentType string) {
}
func (r *Response) AddHeader(name string, value string) {
}
func (r *Response) SetHeader(name string, value string) {
}
func (r *Response) DeleteHeader(name string) {
}
func (r *Response) Header(name string) string {
return ""
}
func (r *Response) HeaderNames() []string {
return nil
}
func (r *Response) Headers(name string) []string {
return nil
}
func (r *Response) Status() http.Status {
return 0
}
func (r *Response) SetStatus(status http.Status) {
}
func (r *Response) Writer() io.Writer {
return nil
}
func (r *Response) Flush() {
}
func (r *Response) IsCommitted() bool {
return false
}
func (r *Response) Reset() {
}