You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
838 B

  1. package requests
  2. import "io"
  3. type CommonRequest struct {
  4. *baseRequest
  5. Product string
  6. Ontology AcsRequest
  7. }
  8. func (request *CommonRequest) TransToAscRequest() {
  9. rpcRequest := &RpcRequest{}
  10. rpcRequest.baseRequest = request.baseRequest
  11. rpcRequest.product = request.Product
  12. request.Ontology = rpcRequest
  13. }
  14. func (request *CommonRequest) BuildUrl() string {
  15. return request.Ontology.BuildUrl()
  16. }
  17. func (request *CommonRequest) BuildQueries() string {
  18. return request.Ontology.BuildQueries()
  19. }
  20. func (request *CommonRequest) GetBodyReader() io.Reader {
  21. return request.Ontology.GetBodyReader()
  22. }
  23. func (request *CommonRequest) GetStyle() string {
  24. return request.Ontology.GetStyle()
  25. }
  26. func (request *CommonRequest) InitWithApiInfo(domain Host, version, urlPath string) {
  27. request.Ontology.InitWithApiInfo(domain, version, urlPath)
  28. }