Apache2-API
view release on metacpan or search on metacpan
lib/Apache2/API/Request.pm view on Meta::CPAN
my @values = $req->args( $name );
my $table = $req->args;
# The keys are case-insensitive.
$table->set( $key => $val );
$table->unset( $key );
$table->add( $key, $val );
$val = $table->get( $key );
@val = $table->get( $key );
$table->merge( $key => $val );
$table_overlay = $table_base->overlay( $table_overlay, $pool );
$table_overlay->compress( APR::Const::OVERLAP_TABLES_MERGE );
$table_a->overlap( $table_b, APR::Const::OVERLAP_TABLES_SET );
Get or sets the query string data by calling L<APR::Body/args>
With no arguments, this method returns a tied L<APR::Request::Param::Table> object (or undef if the query string is absent) in scalar context, or the names (in order, with repetitions) of all the parsed query-string arguments in list context.
With the $key argument, in scalar context this method fetches the first matching query-string arg. In list context it returns all matching args.
See also L</query> for the equivalent, but using L<Apache2::API::Query> instead of L<APR::Body/args>
lib/Apache2/API/Request.pm view on Meta::CPAN
# Do something
# return(0) to abort
});
# To prepare a table of 20 elements, but the table can still grow
my $table = APR::Table::make( $req->pool, 20 );
my $table2 = $req2->headers;
# overwrite any existing keys in our table $table
$table->overlap( $table2, APR::Const::OVERLAP_TABLES_SET );
# key, value pairs are added, regardless of whether there is another element with the same key in $table
$table->overlap( $table2, APR::Const::OVERLAP_TABLES_MERGE );
my $table3 = $table->overlay( $table2, $pool3 );
See L<APR::Table> for more information.
=head2 header_only
This is the same as L</is_header_only>
=head2 headers_as_hashref
Returns the list of headers as an hash reference, by calling L<Apache2::RequestRec/headers_in>
lib/Apache2/API/Response.pm view on Meta::CPAN
# Do something
# return(0) to abort
});
# To prepare a table of 20 elements, but the table can still grow
my $table = APR::Table::make( $resp->pool, 20 );
my $table2 = $resp2->headers;
# overwrite any existing keys in our table $table
$table->overlap( $table2, APR::Const::OVERLAP_TABLES_SET );
# key, value pairs are added, regardless of whether there is another element with the same key in $table
$table->overlap( $table2, APR::Const::OVERLAP_TABLES_MERGE );
my $table3 = $table->overlay( $table2, $pool3 );
See L<APR::Table> for more information.
=head2 headers_out
Returns or sets the C<< key => value >> pairs of outgoing HTTP headers, only on 2xx responses.
See also L</err_headers_out>, which allows to set headers for non-2xx responses and persist across internal redirects.
More information at L<Apache2::RequestRec>
( run in 0.766 second using v1.01-cache-2.11-cpan-49f99fa48dc )