Help for this page

Select Code to Download


  1. or download this
    if (!defined @avail) {
        foreach (split /\n/, &get("https://$ENV{'HTTP_HOST'}/cgi-bin/booki
    +ng.pl?command=check&st=$data{'st'}&ed=$data{'ed'}&force=$data{'force'
    +}", $availability);) {
    ...
            $avail[$k] = $v;
        }
    }
    
  2. or download this
    my $availability = LWP::Simple::get("https://$ENV{'HTTP_HOST'}/cgi-bin
    +/booking.pl?command=check&st=$data{'st'}&ed=$data{'ed'}&force=$data{'
    +force'}");
    
    ...
            $avail[$k] = $v;
        }
    }
    
  3. or download this
    my $availability;
    my $response = LWP::Simple::getstore("https://$ENV{'HTTP_HOST'}/cgi-bi
    +n/booking.pl?command=check&st=$data{'st'}&ed=$data{'ed'}&force=$data{
    +'force'}", $availability);
    print qq[("https://$ENV{'HTTP_HOST'}/cgi-bin/booking.pl?command=check&
    +st=$data{'st'}&ed=$data{'ed'}&force=$data{'force'}")\n];
    print "->$availability<-\n";
    print "$response\n";
    
  4. or download this
    fetch('/api/', {
            method: 'POST',
    ...
        .catch(error => {
            console.log(error.message);
    });