7
0
gaore-common-sdk-go/sdk/requests/common_request.go

37 lines
838 B
Go
Raw Normal View History

2020-08-04 00:51:19 +08:00
package requests
2020-08-05 12:14:49 +08:00
import "io"
2020-08-04 00:51:19 +08:00
type CommonRequest struct {
*baseRequest
2020-08-04 12:23:34 +08:00
Product string
Ontology AcsRequest
}
func (request *CommonRequest) TransToAscRequest() {
2020-08-06 16:26:47 +08:00
rpcRequest := &RpcRequest{}
rpcRequest.baseRequest = request.baseRequest
rpcRequest.product = request.Product
request.Ontology = rpcRequest
2020-08-04 12:23:34 +08:00
}
func (request *CommonRequest) BuildUrl() string {
return request.Ontology.BuildUrl()
}
func (request *CommonRequest) BuildQueries() string {
return request.Ontology.BuildQueries()
2020-08-04 00:51:19 +08:00
}
2020-08-05 12:14:49 +08:00
func (request *CommonRequest) GetBodyReader() io.Reader {
return request.Ontology.GetBodyReader()
}
func (request *CommonRequest) GetStyle() string {
return request.Ontology.GetStyle()
}
func (request *CommonRequest) InitWithApiInfo(domain Host, version, urlPath string) {
request.Ontology.InitWithApiInfo(domain, version, urlPath)
}