Testing POST requests with Swagger UI

Click on POST /api/Customers.

Click on the body of the Example Value to copy it to the c parameter value box, and modify the JSON to define a new customer, as shown in the following JSON and screenshot:

{  "customerID": "SUPER",  "companyName": "Super Company",  "contactName": "Rasmus Ibensen",  "contactTitle": "Sales Leader",  "address": "Rotterslef 23",  "city": "Billund",  "region": null,  "postalCode": "4371",  "country": "Denmark",  "phone": "31 21 43 21",  "fax": "31 21 43 22",  "orders": null}

Click on Try it out!, and note the Request URL, Response Body, Response Code, and Response Headers, as shown in the ...

Get C# 7.1 and .NET Core 2.0 – Modern Cross-Platform Development - Third Edition 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.