Common APIs
Common APIs can be used to access various AI services on HUAWEI CLOUD. For details about the AI services, see the related service documentation.
- API calling
hilens.EIServices.Request(method, host, uri, queryParams, payload, headers)
- Parameter description
Table 1 Parameters Parameter
Mandatory
Type
Description
method
Yes
Enumeration
Request method. The value can be hilens.GET, hilens.POST, hilens.PUT, or hilens.DELETE.
host
Yes
Character string
Request domain name. host and uri comprise a complete request URL.
uri
Yes
Character string
Request URI. host and uri comprise a complete request URL.
queryParams
Yes
Character string
String to be queried.
payload
Yes
Character string
Request body.
headers
Yes
Character string
Request header. The hilens.EIHeaders() object is provided for adding request headers. The following is an example:
headers = hilens.EIHeaders()
headers.add("Content-Type: application/json")
- Return value
EIResponse structure, including requestState and responseBody. For details, see Table 2.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot