There are a few types of situations when you might need to access the original ASP.NET HttpRequest
. You might be migrating to ServiceStack from a large existing WCF code base or another framework where this object was used a lot. You might be required to integrate with a legacy or custom services/clients that are unable to be changed, and your web service endpoints must adhere to a specific set of requests and responses. In this recipe, we will go over some of the options you have when using the ServiceStack framework—the access and use of the original HTTP request object as well as some ways you can leverage how ServiceStack binds values to your request data transfer objects.
You'll need to have your ServiceStack project up and running; please see Creating a ServiceStack solution with VisualStudio and NuGet in Appendix A, Getting Started.