20 lines
549 B
Go
20 lines
549 B
Go
package res
|
|
|
|
type HTTPResponse struct {
|
|
Code int `json:"code"`
|
|
Body interface{} `json:"body"`
|
|
ODataContext string `json:"@odata.context"`
|
|
ODataCount int `json:"@odata.count"`
|
|
ODataNextLink string `json:"@odata.nextLink"`
|
|
}
|
|
|
|
func (res *HTTPResponse) JSON() map[string]interface{} {
|
|
return map[string]interface{}{
|
|
"code": res.Code,
|
|
"body": res.Body,
|
|
"@odata.context": res.ODataContext,
|
|
"@odata.count": res.ODataCount,
|
|
"@odata.nextLink": res.ODataNextLink,
|
|
}
|
|
}
|