Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create expectations over HTTPS #1900

Open
kriodoxis opened this issue Aug 20, 2024 · 0 comments
Open

Create expectations over HTTPS #1900

kriodoxis opened this issue Aug 20, 2024 · 0 comments

Comments

@kriodoxis
Copy link

kriodoxis commented Aug 20, 2024

Describe the feature request
Create expectations over HTTPS

What you are trying to do
After succesfully running Mockserver, I need to create expectations over HTTPS, I´ve tried to create a client with the following code:

new MockServerClient("tests.io", 443, "/test-mockserver")

But I receive the response:

Exception in thread "main" java.lang.IllegalArgumentException: <html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
</body>
</html>

	at org.mockserver.client.MockServerClient.sendRequest(MockServerClient.java:402)

As my server resides in a Cloud environment where it can only accept HTTPS traffic

The solution you'd like
When creating the Mockserver Client, add a flag to indicate to accept secure connections

Describe alternatives you've considered
I´ve tried enabling TLS but haven´t found a clear example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant