WWW::C...:Simple(3pm)

๐Ÿ“ฆ
version 0.100191 ยท 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

โœจ WWW::C...:Simple(3pm) โœจ

okay bestie, welcome to the perl manual for WWW::Curl::Simple โ€” it lives in the User Contributed Perl Documentation section of the manual pages, and yes the title up top got cropped to WWW::C...:Simple(3pm) because man pages are dramatic like that ๐Ÿ’…


๐Ÿ’– NAME ๐Ÿ’–

WWW::Curl::Simple โ€” literally just a Simpler interface to WWW::Curl. that's the whole vibe ๐ŸŒธ

๐ŸŽ€ VERSION ๐ŸŽ€

version 0.100191 โ€” slay, we're on this one โœจ

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

baby's first curl request, look how easy:

my $curl = WWW::Curl::Simple->new();

my $res  = $curl->get('http://www.google.com/');

that's it. that's the whole thing. no cap ๐Ÿซถ

๐ŸŒˆ ATTRIBUTES ๐ŸŒˆ

these are the knobs you can turn bestie, get comfy ๐Ÿ‘‘

  • timeout / timeout_ms โ€” sets the timeout of individual requests. seconds if you use timeout, milliseconds if you use timeout_ms. pick your unit, live your truth ๐Ÿ’–
  • max_redirects โ€” sets the max number of redirects that should be transparently followed. set it to 0 if you do not want to follow redirects, periodt. Default: 5.
  • check_ssl_certs โ€” says whether the underlying Curl library should check SSL certificates when making https requests. Defaults to 1 (i.e. do check certs, to err on the safe side). honestly? safety first bestie ๐Ÿ›ก๏ธโœจ
  • ssl_cert_bundle โ€” specifies the bundle to look for CA certificates in. leave it blank for the system default, which should work if your libcurl is properly compiled. iykyk ๐Ÿ”
  • connection_timeout / connection_timeout_ms โ€” sets the timeout of the connect phase of requests, in seconds or milliseconds. yes this is different from the request timeout above, the connect phase is its own little era ๐Ÿงš
  • fatal โ€” defaults to true, but if you set it to false, it will make failure in multi-requests warn instead of die. so like, chill mode ๐Ÿ˜Œ

๐Ÿ‘‘ METHODS ๐Ÿ‘‘

๐Ÿ’… request($req)

$req should be a HTTP::Request object.

if you've got a URI string or object instead, look at the "get" method instead. Returns a WWW::Curl::Simple::Request object. ๐ŸŽ€

๐ŸŒธ get($uri || URI)

accepts one parameter, which should be a reference to a URI object or a string representing a URI. Returns a HTTP::Response object. this is the one from the synopsis, iconic behavior ๐Ÿ’–

๐Ÿ“ post($uri || URI, $form)

creates a HTTP::Request of type POST to $uri, which can be a string or a URI object, and sets the form of the request to $form. See HTTP::Request for more information on the format of $form. ๐Ÿ“ฎ

โญ add_request($req)

adds $req (a HTTP::Request object) to the list of URLs to fetch. Returns a WWW::Curl::Simple::Request object.

๐Ÿฆ‹ register($req)

an alias for "add_request". same thing, diff name, we love options โœจ

๐Ÿงš has_request $request

will return true if $request is one of the object's requests. vibe check โœ…

๐Ÿ’œ delete_request $req

removes $req from the object's list of requests. bye bestie ๐Ÿ‘‹

๐Ÿ”ฅ perform

does all the requests added with "add_request" and returns a list of WWW::Curl::Simple::Request objects. the main character method fr fr ๐Ÿ‘‘

๐ŸŒˆ wait

this method is here to provide an easier transition from LWP::Parallel::UserAgent. it is by no means a drop in replacement, but using "wait" instead of "perform" makes the return value more like that of LWP::UA. โš ๏ธ not a drop in replacement, hear me when i say it ๐Ÿซถ


๐Ÿ’œ AUTHOR ๐Ÿ’œ

Andreas Marienborg <andremar@cpan.org> โ€” the originator, the blueprint ๐Ÿ’–

๐Ÿซถ CONTRIBUTORS ๐Ÿซถ

  • Bjรธrn-Olav Strand <bo@startsiden.no>
  • Graham Knop <haarg@haarg.org>
  • Marcus Ramberg <marcus@nordaaker.com>
  • Neil Bowers <neil@bowers.com>
  • chromatic <chromatic@wgz.org>

the whole squad showed up, we love to see it โœจ

this software is copyright (c) 2013 by Andreas Marienborg.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go forth and remix ๐ŸŽ€


and that's the page bestie!! ๐ŸŒธ this little number is from perl v5.36.0, dated 2022-08-29, and it's filed under WWW::C...:Simple(3pm). go write something cute with it ๐Ÿ’…โœจ๐Ÿฆ‹
๐Ÿ“ฆ where this page comes from