Any suggestions why I'm getting host name invalid ? "HTTP Error 400. The request hostname is invalid

INvalid Host Name error_TH API.png
Any suggestions why I'm getting host name invalid ? "HTTP Error 400. The request hostname is invalid.</p>"
The question has been raised internal only.

Best Answer

Answers

  • Hi @Uttam.Haridas ,

    I can get the data properly, the response code in your screenshot, 400 Bad request indicates that the server cannot process the request

    1687755098055.pngCan you tried with the formatted request below instead?

    {
    "Request": {
    "Identifiers": [
    {
    "Identifier": "US4592001014",
    "IdentifierType": "Isin",
    "LineNumber": "1",
    "UserDefinedIdentifier": "US4592001014"
    },
    {
    "Identifier": "2046251",
    "IdentifierType": "Sedol",
    "LineNumber": "1",
    "UserDefinedIdentifier": "2046251"
    },
    {
    "Identifier": "459200101",
    "IdentifierType": "Cusip",
    "LineNumber": "1",
    "UserDefinedIdentifier": "459200101"
    }
    ],
    "Range": {
    "Start": "1996-01-01T00:00:00.000Z",
    "End": "2023-06-22T00:00:00.000Z"
    }
    }
    }
  • @raksina.samasiri -

    Hi Raksina, The formatted request is the same as the above original body request right, will it help to fix the invalid host name error????