No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

RESTful API Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes the OPS APIs supported by the device, including OPS-supported operations, request examples, elements in the requests, response examples, elements in the responses, and response status codes.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configure an HTTP Client

Configure an HTTP Client

Operation

URI

Description

GET

/https/httpClientCfgs/httpClientCfg

Query the HTTP connection status.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <httpQueryConnect> 
        <vrId>0</vrId> 
        <serverAddr>192.168.1.2</serverAddr>
        <serverPort>8080</serverPort> 
        <method>1</method> 
        <uri>/lib/a.crl</uri> 
        <queryHeader>host:192.168.1.1</queryHeader> 
        <isShortConn>false</isShortConn> 
        <clientTimeOut>60</clientTimeOut> 
        <vrfIndex>0</vrfIndex> 
    </httpQueryConnect>

    Table 3-861 describes elements in requests.

    Table 3-861  Elements in requests

    Element

    Description

    vrId

    Specifies the ID of a virtual router.

    serverPort

    Specifies a server IP address.

    serverPort

    Specifies a server port number.

    method

    Specifies an OPS operation method.

    • 1: GET
    • 2: PUT
    • 3: POST
    • 4: DELETE

    uri

    Specifies a Uniform Resource Identifier.

    queryHeader

    Specifies the header of a query packet.

    isShortConn

    Indicates whether a connection is a short connection.

    • true: Yes
    • false: No

    clientTimeOut

    Specifies a client timeout interval, in seconds.

    vrfIndex

    Specifies a VPN index.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <httpQueryConnects> 
        <httpQueryConnect> 
            <vrId>0</vrId> 
            <serverAddr>192.168.1.2</serverAddr>
            <serverPort>8080</serverPort> 
            <method>1</method> 
            <uri>/lib/b.crl</uri>
            <queryHeader>host:192.168.1.1</queryHeader> 
            <queryBody> </queryBody> 
            <isShortConn>true</isShortConn> 
            <clientTimeOut>60</clientTimeOut> 
            <vrfIndex>0</vrfIndex> 
            <rspBody></rspBody> 
            <rspHead>Content-Type: text/html&#13; 
    Accept-Ranges: bytes&#13; 
    Server: HFS 2.3 beta</rspHead> 
            <rspStatus>200</rspStatus> 
        </httpQueryConnect> 
    </httpQueryConnects>

    Table 3-862 describes elements in responses.

    Table 3-862  Elements in responses

    Element

    Description

    vrId

    Specifies the ID of a virtual router.

    serverPort

    Specifies a server IP address.

    serverPort

    Specifies a server port number.

    method

    Specifies an OPS operation method.

    • 1: GET
    • 2: PUT
    • 3: POST
    • 4: DELETE

    uri

    Specifies a Uniform Resource Identifier.

    queryHeader

    Specifies the header of a query packet.

    queryBody

    Specifies the body of a query packet.

    isShortConn

    Indicates whether a connection is a short connection.

    • true: Yes
    • false: No

    clientTimeOut

    Specifies a client timeout interval, in seconds.

    vrfIndex

    Specifies a VPN index.

    rspBody

    Specifies the body of a response packet.

    rspHead

    Specifies the header of a response packet.

    rspStatus

    Specifies a status code in a response.

    Table 3-863  Status codes in responses

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request cannot be implemented because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    Internal errors in services cause a request failure or an unidentified request.

Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166567

Views: 17652

Downloads: 116

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next