IM::Http(3pm)

πŸ“¦
version 153 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– NAME πŸ’–

IM::Http β€” bestie, it's an HTTP handler ✨ that's literally the whole vibe πŸ¦‹


✨ SYNOPSIS ✨

use IM::Http;

(rc, data) = http_process(spec, http_proxy, no_proxy)
    rc:
        0: success
        -1: failure

So you call it, and it hands you back two things: an rc and some data, periodt. The rc is giving pass/fail energy: 0 means success πŸŽ€ and -1 means failure πŸ’€ no in-between, no cap.


🌸 DESCRIPTION 🌸

Okay so the IM::Http module handles HTTP. That's it, that's the job, she's booked and busy πŸ’…

This module is provided by IM (Internet Message). iykyk 🧚


πŸ¦‹ EXAMPLES πŸ¦‹

Here's the moment you've been waiting for, bestie, a whole lil demo:

my($rc, $data) = http_process($spec, httpproxy(), noproxy())
if ($rc < 0) {
    exit 1;
}
foreach (@$data) {
    print;
}

So: run it, check if $rc < 0, and if it is β€” bail with exit 1 😭 β€” otherwise loop over the array ref $data and print every single thing in it. Ate, fr fr πŸ”₯


IM (Internet Message) is copyrighted by the IM developing team. You can redistribute it and/or modify it under the modified BSD license 🌈. Peep the copyright file for more details β€” it's all in there, go read it πŸ“–πŸ’–


And that's the tea, bestie πŸ“ β€” this page is from IM153, dated 2016-10-10, and it's the IM::Http(3pm) manual page itself. Stan a classic ✨🫢

πŸ“¦ where this page comes from