...

Package response

import "github.com/aliyun/credentials-go/credentials/response"
Overview
Index

Overview ▾

type CommonResponse

CommonResponse is for storing message of httpResponse

type CommonResponse struct {
    // contains filtered or unexported fields
}

func (*CommonResponse) GetHTTPContentBytes

func (resp *CommonResponse) GetHTTPContentBytes() []byte

GetHTTPContentBytes return body content as []byte

func (*CommonResponse) GetHTTPContentString

func (resp *CommonResponse) GetHTTPContentString() string

GetHTTPContentString return body content as string

func (*CommonResponse) GetHTTPHeaders

func (resp *CommonResponse) GetHTTPHeaders() map[string][]string

GetHTTPHeaders returns httpresponse's headers

func (*CommonResponse) GetHTTPStatus

func (resp *CommonResponse) GetHTTPStatus() int

GetHTTPStatus returns httpStatus

func (*CommonResponse) ParseFromHTTPResponse

func (resp *CommonResponse) ParseFromHTTPResponse(httpResponse *http.Response) (err error)

ParseFromHTTPResponse assigns for CommonResponse, returns err when body is too large.