summary refs log tree commit diff
path: root/lib/Net/HTTP/Spore/Middleware/DoNotTrack.pm
blob: 9df053a0d5a534a1eae40fcfc32cbffb739699a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package Net::HTTP::Spore::Middleware::DoNotTrack;

# ABSTRACT: add a new header to not track

use Moose;
extends 'Net::HTTP::Spore::Middleware';

sub call {
    my ($self, $req) = @_;
    $req->header('x-do-not-track' => 1);
}

1;

=head1 SYNOPSIS

    my $client = Net::HTTP::Spore->new_from_spec('twitter.json');
    $client->enable('Runtime');

=head1 DESCRIPTION

Add a header B<x-do-not-track> to your requests. For more details see L<http://donottrack.us/>.