diff options
Diffstat (limited to 'lib/Net/HTTP/Spore.pm')
| -rw-r--r-- | lib/Net/HTTP/Spore.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Net/HTTP/Spore.pm b/lib/Net/HTTP/Spore.pm index 38ba4f7..d4fd8af 100644 --- a/lib/Net/HTTP/Spore.pm +++ b/lib/Net/HTTP/Spore.pm @@ -192,6 +192,10 @@ or only on some path $client->enable_if(sub{$_->[0]->path =~ m!/path/to/json/stuff!}, 'Format::JSON'); +For very simple middlewares, you can simple pass in an anonymous function + + $client->enable( sub { my $request = shift; ... } ); + =head2 METHODS =over 4 |
