Home | History | Annotate | Download | only in http

Lines Matching refs:Response

5 // HTTP Response reading and parsing.
28 // Response represents the response from an HTTP request.
30 type Response struct {
37 // Header maps header keys to values. If the response had multiple
47 // Body represents the response body.
73 // ReadResponse nor Response.Write ever closes a connection.
76 // Uncompressed reports whether the response was sent compressed but
81 // from the responseHeader. To get the original response from
99 // Request is the request that was sent to obtain this Response.
105 // response was received. It is nil for unencrypted responses.
112 func (r *Response) Cookies() []*Cookie {
116 // ErrNoLocation is returned by Response's Location method
118 var ErrNoLocation = errors.New("http: no Location header in response")
120 // Location returns the URL of the response's "Location" header,
122 // the Response's Request. ErrNoLocation is returned if no
124 func (r *Response) Location() (*url.URL, error) {
135 // ReadResponse reads and returns an HTTP response from r.
137 // to this Response. If nil, a GET request is assumed.
140 // pairs included in the response trailer.
141 func ReadResponse(r *bufio.Reader, req *Request) (*Response, error) {
143 resp := &Response{
147 // Parse the first line of the response.
157 return nil, &badStringError{"malformed HTTP response", line}
177 // Parse the response headers.
210 // in the response is at least major.minor.
211 func (r *Response) ProtoAtLeast(major, minor int) bool {
216 // Write writes r to w in the HTTP/1.x server response format,
219 // This method consults the following fields of the response r:
231 // The Response Body is closed after it is sent.
232 func (r *Response) Write(w io.Writer) error {
252 r1 := new(Response)
276 // If we're sending a non-chunked HTTP/1.1 response without a