Dancer-Plugin-RESTModel

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


This plugin lets you talk to a REST server as a separate model from within
your Dancer (http://perldancer.org) app. It is useful for keeping your API
decoupled from your app while still being able to manage it through the
configuration file.


BASIC USAGE
-----------

set the REST endpoint in your Dancer configuration file:

```yaml
    plugins:
      RESTModel:
        MyData:
          server: http://localhost:5000
          type: application/json
          clientattrs:
            timeout: 5
```

lib/Dancer/Plugin/RESTModel.pm  view on Meta::CPAN

42;
__END__

=head1 NAME

Dancer::Plugin::RESTModel - REST model class for Dancer apps


=head1 SYNOPSIS

set the REST endpoint in your Dancer configuration file:

    plugins:
      RESTModel:
        MyData:
          server: http://localhost:5000
          type: application/json
          clientattrs:
            timeout: 5

then use it from any of your routes/controllers:

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.128 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )