in reply to io::socket::ssl connecting to specific page on site

PeerAddr => 'example.com:https' is an address that can be looked up in a DNS and a port, PeerAddr => 'example.com/stream/report?token=4gaPemdzfM2M9XwMU9HT8MJSc6Fu6MlA:https', is not. Besides the name it includes part of the get substructure in what would be considered the ip addres subfield.

use strict; use IO::Socket::SSL; # qw(debug3); # simple client my $cl = IO::Socket::SSL->new( PeerAddr => 'example.com:https', ) or die $!; print $cl "GET /stream/report?token=4gaPemdzfM2M9XwMU9HT8MJSc6Fu6M +lA HTTPS/1.0\r\n\r\n";

Replies are listed 'Best First'.
Re^2: io::socket::ssl connecting to specific page on site
by noxxi (Pilgrim) on Apr 12, 2017 at 15:04 UTC

    > print $cl "GET /stream/report?token=4gaPemdzfM2M9XwMU9HT8MJSc6Fu6MlA HTTPS/1.0\r\n\r\n";

    That's interesting that this worked. Must be a forgiving server since the protocol version should not be HTTPS/1.0 but HTTP/1.0 (without S).

      I corrected it to http in the actual code, it fails with https.
Re^2: io::socket::ssl connecting to specific page on site
by ve6sar (Novice) on Apr 12, 2017 at 04:01 UTC

    Thank You Huck that worked now to figure out how to decode streaming JSON.

    Sean