Skip to content

Instantly share code, notes, and snippets.

@wgv-zbonham
Created June 23, 2015 23:04
Show Gist options
  • Save wgv-zbonham/34cbdca58ae6b14bf32d to your computer and use it in GitHub Desktop.
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