Search Results for

    Show / Hide Table of Contents

    Method SendHTTPRequest

    SendHTTPRequest(String, HTTPRequestContract)

    Send HTTP Request

    Declaration
    HTTPResponseContract SendHTTPRequest(string connectionId, HTTPRequestContract request)
    Parameters
    Type Name Description
    System.String connectionId

    The connection id to identify your connection. See also ConnectionId

    HTTPRequestContract request

    Http request contract which handles the request

    Returns
    Type Description
    HTTPResponseContract

    Response body and status code

    Examples

    POST http://YourServerName/InfoShare/Json/Server/SendHTTPRequest

    Send http request.

    {
       "connectionId": "af45c56c-da84-4f2e-a186-6240c1d6bb9b"
       "request": 
            {
                "Url": "https://google.com",
                "CommandType": "GET",
                "ContentType": "application/json",
                "Body": "body",
                "TimeOut": 50000,
                "WaitForResponse": true
            }
    }

    Response:

    {
        "SendHTTPRequestResult":
            {
                "ResponseBody": "Response",
                "ContentType": "application/json",
                "StatusCode": 200,
                "StatusDescription": "OK"
            }
    }
    Exceptions
    Type Condition
    ServiceException

    The connection id {connectionId} isn't valid or has expired (10008)

    ServiceException

    Not allowed for this client type (10326)

    Back to top Copyright © Kendox