Conditional e-tags (#183) #547

Closed
wants to merge 3 commits into
from

2 participants

@prabirshrestha

Here are two extension methods for ETags and Last-Modified based on http://simoncropp.com/conditionalresponseswithnancyfx

using Nancy.Caching;

public class SampleModule : NancyModule
{
    public SampleModule()
    {
        this.CheckForIfNonMatch();
        this.CheckForIfModifiedSince();

        Get["/img"] = x => Response.AsImage("pic.png");
    }
}

I added this extension method under Nancy.Caching namespace

@prabirshrestha

Pull request for issue #183

@grumpydev
Custodians of the Super-Duper-Happy-Path member

Will probably roll this into #183

@grumpydev
Custodians of the Super-Duper-Happy-Path member

Added for static content.

@grumpydev grumpydev closed this Feb 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment