Name

SPVM::HTTP::Minimal::Headers - HTTP Headers

Description

The HTTP::Minimal::Headers class of SPVM has methods to manipulate HTTP headers.

Usage

my $headers = HTTP::Minimal::Headers->new;

Class Methods

new

static method new : HTTP::Minimal::Headers ();

Creates a new HTTP::Minimal::Headers object.

Instance Methods

add

method add : void ($name : string, $value : string);

Adds a header.

remove

method remove : void ($name : string);

Removes a header.

get

method get : string[] ($name : string);

Gets a header value.

get_as_string

method get_as_string : string ($name : string);

Gets a header value as a string.

names

method names : string[] ();

Gets header names.

to_string

method to_string : string ();

Converts all headers to a string.

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License