

using System.Collections.Generic;
using System.Linq;

namespace restlicsharpclient.restliclient.response
{
    /// <summary>
    /// Representation of a rest response.
    /// <para>Returned by an instance of the RestResponseDecoder interface.</para>
    /// </summary>
    public abstract class Response
    {
        public IReadOnlyDictionary<string, IReadOnlyList<string>> headers;
        public int status;

        public Response(Dictionary<string, List<string>> headers, int status)
        {
            this.headers = headers.ToDictionary(_ => _.Key, _ => (IReadOnlyList<string>)_.Value.ToList());
            this.status = status;
        }
    }
}
