HTTP-Simple
    
    
  
  
  
view release on metacpan or search on metacpan
    Sends a POST request to the given URL with the given data structure
    encoded to JSON. Returns the response body as a byte string. Throws an
    exception on connection, HTTP, or JSON errors.
 postfile
      my $contents = postfile($url, $path);
      my $contents = postfile($url, $path, $content_type);
    Sends a POST request to the given URL, streaming the contents of the
    given file. The content type is passed as application/octet-stream if
    not specified. Returns the response body as a byte string. Throws an
    exception on connection, HTTP, or filesystem errors.
 is_info
      my $bool = is_info($status);
    Returns true if the status code indicates an informational response
    (1xx).
lib/HTTP/Simple.pm view on Meta::CPAN
Sends a POST request to the given URL with the given data structure encoded to
JSON. Returns the response body as a byte string. Throws an exception on
connection, HTTP, or JSON errors.
=head2 postfile
  my $contents = postfile($url, $path);
  my $contents = postfile($url, $path, $content_type);
Sends a POST request to the given URL, streaming the contents of the given
file. The content type is passed as C<application/octet-stream> if not
specified. Returns the response body as a byte string. Throws an exception on
connection, HTTP, or filesystem errors.
=head2 is_info
  my $bool = is_info($status);
Returns true if the status code indicates an informational response (C<1xx>).
( run in 0.557 second using v1.01-cache-2.11-cpan-5dc5da66d9d )