Inside the ServiceStack Service, you can access IHttpRequest and IHttpResponse with:
public class ContactService : Service { public object Get(Contact request) { var headerValue = base.Request.Headers[headerKey];
IHttpRequest is a wrapper over the underlying ASP.NET HttpRequest or HttpListenerRequest (depending on whether you are hosted on ASP.NET or a self-hosted HttpListener). Therefore, if you are working in ASP.NET, you can get the basic ASP.NET HttpRequest with
var aspnetRequest = (HttpRequest)base.Request.OriginalRequest; var headerValue = aspnetRequest.Headers[headerKey];
source share