Beispiel #1
0
 public Request And(Headers <RequestHeader> headers) => new Request(Method, Uri, Version, headers, Body);
Beispiel #2
0
        // ===========================================
        // instance
        // ===========================================

        public Header HeaderOf(string name) => Headers.HeaderOf(name);
 public static Headers <ResponseHeader> WithHeaders(ResponseHeader header) => Headers.Of(header);
Beispiel #4
0
 public Headers <T> And(Headers <T> headers)
 {
     _list.AddRange(headers);
     return(this);
 }
Beispiel #5
0
 public string HeaderValueOr(string headerName, string defaultValue)
 => Headers.HeaderOf(headerName)?.Value ?? defaultValue;
 public static Headers <ResponseHeader> WithHeaders(string name, string value) => Headers.Of(Of(name, value));
Beispiel #7
0
 public static Response Of(Version?version, ResponseStatus statusCode, Headers <ResponseHeader> headers, Body?entity)
 => new Response(version, statusCode, headers, entity);
Beispiel #8
0
 public static Response Of(ResponseStatus statusCode, Headers <ResponseHeader> headers, Body entity)
 => new Response(Version.Http1_1, statusCode, headers, entity);
Beispiel #9
0
 public static Response Of(Version version, ResponseStatus statusCode, Headers <ResponseHeader> headers, byte[] entity)
 => new Response(version, statusCode, headers, Body.From(entity));
Beispiel #10
0
 public static Response Of(Version version, ResponseStatus statusCode, Headers <ResponseHeader> headers)
 => new Response(version, statusCode, headers, Body.Empty);
Beispiel #11
0
 public static Request From(Method method, Uri uri, Version version, Headers <RequestHeader> headers, Body body)
 => new Request(method, uri, version, headers, body);