question

Upvotes
Accepted
1 0 1 1

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.

#technologydatascope-selecthosting
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Uttam.Haridas

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@Uttam.Haridas

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvotes
Accepted
79.3k 253 52 74

@Uttam.Haridas

Please check the Console tab and click on "Show raw log" to verify the request message.

1687922017581.png


1687922017581.png (116.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
14.2k 30 5 10

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"
        }
    }
}

1687755098055.png (115.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@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????

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.