newResponse creates a new Response for the provided http.Response. r must not be nil.
(r *http.Response)
| 989 | // newResponse creates a new Response for the provided http.Response. |
| 990 | // r must not be nil. |
| 991 | func newResponse(r *http.Response) *Response { |
| 992 | response := &Response{Response: r} |
| 993 | response.populatePageValues() |
| 994 | response.Rate = parseRate(r) |
| 995 | response.TokenExpiration = parseTokenExpiration(r) |
| 996 | return response |
| 997 | } |
| 998 | |
| 999 | // populatePageValues parses the HTTP Link response headers and populates the |
| 1000 | // various pagination link values in the Response. |
searching dependent graphs…