1

I want to send something.crt with HttpURLConnection.

It always says something like:

javax.net.ssl.SSLException: Received fatal alert: unexpected_message

String requestURL = "https://some.thing.com:5874/SomeService/OperationsEndpoint1";

HttpsURLConnection connection = (HttpsURLConnection) new

URL(requestURL).openConnection();

connection.setRequestMethod("POST");

String httpCode = connection.getResponseCode();

String responseMessage = connection.getResponseMessage();

0

1 Answer 1

4

You would use the javax.net.ssl.HttpsURLConnection class, not java.net.HttpURLConnection.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks but not working, same error.
Can you give some more details. Maybe some code could help

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.