Skip to content

Instantly share code, notes, and snippets.

View wahmedswl's full-sized avatar

Waqas Ahmed wahmedswl

  • Sequel Systems Inc
  • Islamabad
View GitHub Profile
@wahmedswl
wahmedswl / OWINHosting.cs
Created December 14, 2020 16:59
OWIN Hosting with multiple Urls and related configuration
public static IDisposable HttpInterface(Setting setting, Interface @interface = null, string url = null, bool adminApi = false)
{
var httpInterface = WebApp.Start(url ?? @interface.Http.Url, (app) =>
{
var config = new HttpConfiguration();
config.Formatters.JsonFormatter.MediaTypeMappings.Add(new System.Net.Http.Formatting.RequestHeaderMapping("Accept",
"text/html",
StringComparison.InvariantCultureIgnoreCase,
true,
"application/json"));
{
"meta": {
"theme": "stackoverflow"
},
"basics": {
"name": "Aditya Tandon",
"label": "Frontend Developer",
"picture": "",
"email": "[email protected]",
"phone": "(+91)-9625426012",