API Enablement

Im defining a restclient - how do I specifiy headers?

  • 1.  Im defining a restclient - how do I specifiy headers?

    IBM Champion
    Posted Sun October 04, 2020 01:43 PM

    Im using
    <zosconnect_zosConnectServiceRestClient id="restClientServiceY"
    host="10.1.3.10"
    port="19443"
    sslCertsRef="defaultSSLSettings"
    uri="/remote/endpoin2"
    httpMethod="GET"/>
    <zosconnect_zosConnectService serviceName="serviceY" serviceRef="restClientServiceY" invokeURI="/my/1"
    />

    which works... and I can send the request to my back end using
    curl --insecure --header Content-Type:application/json --verbose -i --cacert cacert.pem --cert adcdd.pem:password --key adcdd.key.pem --data {"sqreq":"99"} -X GET https://10.1.3.10:9443/my/1


    I would like to send headers like --header Content-Type:application/json to my back end so it knows what data format to use.  Is this possible?

    Im getting the following headers at my server

    GET /remote/endpoint HTTP/1.1
    User-Agent: IBM_zOS_Connect_REST_SP/open beta/20200803-0918
    X-Correlation-ID: BAQ1wsHYAQAYwcTDxNfTQEDi8ObxQEBAQNieunfoaWwAAA==
    Accept: */*
    Cache-Control: no-cache
    Pragma: no-cache
    Host: 10.1.3.10:19443
    Connection: keep-alive

    I can find nothing on the zosconnect_zosConnectServiceRestClient definition


    Thank you

    Colin



    ------------------------------
    Colin Paice
    ------------------------------