You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 4, 2022. It is now read-only.
This is the code I use to connect to a remote server:
val postUrl = "https://api.luftdaten.info/v1/push-sensor-data/"
val response = Http(postUrl).headers(Seq("X-PIN" -> "1", "X-Sensor" -> s"fijnstof-${report.id}")).postForm(Seq("P1" -> report.pm10.toString, "P2" -> report.pm25.toString)).option(HttpOptions.allowUnsafeSSL).asString
log.debug(s"Luftdaten: $response")
The response I get is a 403 Forbidden with:
Reason: The client software did not provide a hostname using Server Name Indication (SNI), which is required to access this server.`
I tried setting System.setProperty("jsse.enableSNIExtension", "true"), even though the underlying java.net.HttpsURLConnection is said to default to true.
This is the code I use to connect to a remote server:
The response I get is a 403 Forbidden with:
I tried setting
System.setProperty("jsse.enableSNIExtension", "true"), even though the underlying java.net.HttpsURLConnection is said to default to true.Is this a bug, or am I missing something?