CHAPTER 4

image

Content Negotiation and Media Types

This chapter covers the concept of content negotiation, handling media types, and working with model binding. It also covers handling binary data and file uploads in ASP.NET Web API applications.

You will learn how to do the following:

  • Request and respond with various media types (Recipes 4-1 and 4-2)
  • Control model binding (Recipes 4-3 and 4-4)
  • Customize content negotiation (Recipes 4-5, 4-6, and 4-9)
  • Perform content negotiation by hand or bypass it (Recipes 4-7 and 4-8)
  • Work with binary data (Recipe 4-10)
  • Accept file uploads in your Web API application (Recipes 4-11, 4-12 and 4-13)

4-1. Request a ...

Get ASP.NET Web API 2 Recipes: A Problem Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.