Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.
/ RespondTo Public archive

An easy way to have multiple outputs from your ordinary actions

Notifications You must be signed in to change notification settings

luizbon/RespondTo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

An easy way to respond in different types

Since I've seen RoR respond_to I always wanted a way to do this multiple response type from an Action, that's why I've created RespondTo

With RespondTo is possible to customize outputs for actions with minimal effort.

##Description RespondTo works with extensions, so if you want to output json files, its necessary to use the json extension, for xml the xml extension and so forth. After an extension installed and registered actions will start to respond models as based on url extension or Accept headers.

##Installation Install-Package RespondTo Since RespondTo works with extensions, only this package isn't enough, is necessary to install an extension or create your own.

Currently exists two extensions:

  • RespondTo.Json
  • RespondTo.Xml

##Usage To use RespondTo is necessary just register extensions on your startup code, ex:

using Route = RespondTo.Route;
...
Route.RespondTo.Json().Register();
//or register xml
Route.RespondTo.Xml().Register();
//or even register multiple extensions
Route.RespondTo.Json().Xml().Register();

About

An easy way to have multiple outputs from your ordinary actions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published