Exemplo n.º 1
0
 public static IEnumerable <StringWithQualityHeaderValue> GetAcceptLanguage(this Microsoft.AspNetCore.Http.HttpRequest req)
 => req.GetHeaders("Accept-Language")
 .Select(acceptString => new StringWithQualityHeaderValue(acceptString));
Exemplo n.º 2
0
 public static string GetAuthorization(this Microsoft.AspNetCore.Http.HttpRequest req)
 => req.GetHeaders("Authorization")
 .First(
     (v, next) => v,
     () => string.Empty);
Exemplo n.º 3
0
 public static IEnumerable <MediaTypeWithQualityHeaderValue> GetAcceptTypes(this Microsoft.AspNetCore.Http.HttpRequest req)
 => req.GetHeaders("accept")
 .Select(acceptString => new MediaTypeWithQualityHeaderValue(acceptString));
Exemplo n.º 4
0
 public static string GetMediaType(this Microsoft.AspNetCore.Http.HttpRequest req)
 => req.GetHeaders("content-type")
 .First(
     (v, next) => v,
     () => string.Empty);