public static IApplicationBuilder UseCamoServer(this IApplicationBuilder builder, PathString pathMatch, CamoServerSettings settings, HttpClient httpClient) { var server = new CamoServer(pathMatch, settings, httpClient); builder.Use(async (context, next) => { await next(); await server.Invoke(context); }); return builder; }
public CamoServer(PathString pathPrefix, CamoServerSettings settings, HttpClient httpClient) { _pathPrefix = pathPrefix; _settings = settings; _httpClient = httpClient; _signature = new CamoSignature(_settings.SharedKey); }
public static IApplicationBuilder UseCamoServer(this IApplicationBuilder builder, string pathMatch, CamoServerSettings settings, HttpClient httpClient) { return UseCamoServer(builder, new PathString(pathMatch), settings, httpClient); }
public CamoServer(CamoServerSettings settings, HttpClient httpClient) : this(new PathString(), settings, httpClient) { }