Author image Jakob Voß
and 1 contributors

NAME

Catmandu::Importer::getJSON - Load JSON-encoded data from a server using a GET HTTP request

VERSION

version 0.1

DESCRIPTION

This Catmandu::Importer performs a HTTP GET request to load JSON-encoded data from a server. Each input line corresponds to a HTTP request. The following input formats are accepted:

plain URL

A line that starts with "http://" or "https://" is used as URL as given.

URL path

A line that starts with "/" is appended to the configured url parameter.

variables

A JSON object with variables to be used with an URL Template or as HTTP query parameters.

If the HTTP response is a JSON array, its elements are returned as items.

CONFIGURATION

url

An URL to load from. Can be an URI or an URI templates (URI::Template) as defined by http://tools.ietf.org/html/rfc6570. If no URL is configured, the URL must be provided from input.

timeout
agent
proxy

Optional HTTP client settings.

client

Instance of Furl to do HTTP requests with. Future versions of this module may also support other HTTP fetching modules, such as HTTP::Async for asynchronous requests.

file
fh

Input to read lines from (see Catmandu::Importer). Defaults to STDIN.

fix

An optional fix to be applied on every item (see Catmandu::Fix).

TODO

Error handling!

AUTHOR

Jakob Voß

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Jakob Voß.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 156:

alternative text 'http://tools.ietf.org/html/rfc6570' contains non-escaped | or /