Skip to content

Instantly share code, notes, and snippets.

@wgv-zbonham
Created June 23, 2015 23:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wgv-zbonham/34cbdca58ae6b14bf32d to your computer and use it in GitHub Desktop.
Example of redirecting after taking some action (e.g. increment download count)
using System;
using System.Web.Http;
namespace WgvPlayback.Controllers
{
[RoutePrefix("/api/sharelinks")]
public class ShareLinksController : ApiController
{
public IHttpActionResult Get(Guid id)
{
// increment download count for share link instance id
// create SasKey for container's packaged.zip
// issue redirect
var zipUrl = string.Empty;
return Redirect(zipUrl);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment