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

πŸ“¦
version 0.100191 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– WWW::Curl::Simple::Request πŸ’–

okay so bestie, we're diving into WWW::Curl::Simple::Request β€” a 3pm page from the User Contributed Perl Documentation, and it is adorable, it's literally just a lil class that holds onto a request and a response like it's carrying your iced coffee for you. 🫢


✨ NAME ✨

WWW::Curl::Simple::Request β€” a small class representing request/response. tiny. humble. doing the most behind the scenes, no cap.


🌸 VERSION 🌸

version 0.100191


πŸ¦‹ DESCRIPTION πŸ¦‹

So the tea is: this class is just a way to collect the things that both the single and the multi sides of the world need, plus a lil bit of WWW::Curl setup. That's it, that's the whole job. πŸŽ€

And listen β€” you genuinely shouldn't need to use this class anywhere yourself. It's giving backstage crew, not main character. BUT plot twist: $curl->perform hands you back objects of this class, so you'll absolutely run into them whether you meant to or not. Surprise! πŸ’…


πŸ‘‘ ATTRIBUTES πŸ‘‘

πŸ“ agent

A String πŸ’« that gets sent as the user-agent string. Defaults to "WWW::Curl::Simple/" plus the current version number, so it knows exactly who it is, iconic.

πŸ“ body

The body of the response. yeah. the whole vibe. 😌

The head of the response. the lil hat on top of the body, if you will. 🎩

πŸ“ request

The HTTP::Request object used to create this response. it remembers where it came from, we love a class with roots. 🌱

πŸ“ simple_ua

The WWW::Curl::Simple instance that generated this request. its parent, basically. proud of u bb. πŸ₯Ή

πŸ“ easy

The WWW::Curl::Easy object which created this response. the actual muscle behind everything, honestly. πŸ’ͺ


πŸ’€ METHODS πŸ’€

✨ perform ✨

Performs the actual request through WWW::Curl::Easy. Used mostly in single request land, if yk yk. 🌈

⚠️ heads up bestie: will croak on errors. like, it will die, no soft launch, no "we'll talk about it later". so wrap it up if you're not ready for that energy. πŸ’€

✨ response ✨

Returns a HTTP::Response that represents the response of this object. 🎁

Also sets request on the response object to the original request object β€” so the response knows exactly which request it's answering. it's giving matched set, soulmate behavior, fr fr. 🫢


πŸ’œ AUTHOR πŸ’œ

Andreas Marienborg <andremar@cpan.org>


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. open source queen behavior tbh πŸ‘‘


and that's the whole page!! πŸŽ€ thanks for reading, ily, go write some curl code ✨

this has been perl v5.36.0, dated 2022-08-29, signing off β€” mwah πŸ’‹

πŸ“¦ where this page comes from