Processing client SSL access

I cannot seem to find any examples of using the processing client to access an SSL protected website. Here is my code. It just returns a 400 error. Is the Processing default client capable of doing SSL or should I look to something else?

TIA

Code Snip:

 String data = "";
   c = new Client(this, "api.nasa.gov", 443);  
   c.write("GET /planetary/earth/imagery?lon=-105.3&lat=31.7&api_key=mykey HTTPS/1.0\n");  
         
   delay(1000);
   
   while (c.available() > 0) {    // Read data coming from into the client....
       data += c.readString();   // ...and put it in a String
       println(data);
    } 

Produces:

HTTP/1.1 400 Bad Request
Server: openresty
Date: Mon, 20 May 2019 23:24:15 GMT
Content-Type: text/html
Content-Length: 170
Connection: close

400 Bad Request

400 Bad Request


openresty
1 Like

Try this: https://www.mkyong.com/java/java-https-client-httpsurlconnection-example/

Kf

1 Like