NAME
Footprintless::Plugin::Atlassian::Confluence::ResponseParser - A response parser for the Atlassian Confluence REST API
VERSION
version 1.00
SYNOPSIS
my $response_parser =
Footprintless::Plugin::Atlassian::Confluence::ResponseParser
->new();
# A parse a get content response
my $response = $response_parser->get_content($http_response);
die('failed') unless $response->{success};
DESCRIPTION
This is the default implementation of a response parser. There is a parse method for corresponding to each build method in Footprintless::Plugin::Atlassian::Confluence::RequestBuilder, and they all parse http responses into a hasref of the form:
my $response = {
status => 0, # truthy if $http_response->is_success()
code => 200, # $http_response->code()
message => 'Success', # $http_response->message()
content => {} # decode_json($http_response->decoded_content())
};
CONSTRUCTORS
new()
Constructs a new response parser.
AUTHOR
Lucas Theisen <lucastheisen@pastdev.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by Lucas Theisen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
SEE ALSO
Please see those modules/websites for more information related to this module.