You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// the request classpublicclassExampleRequest{[FromRoute(Name ="id")]publicintId{get;set;}[FromQuery(Name ="replace")]publicboolReplace{get;set;}[FromBody]publicCustomerCustomer{get;set;}}publicclassCustomer{publicintId{get;set;}publicstringFullName{get;set;}}// controller using FromComposite attribute// this will allow you to pass in the id in the route// the replace flag as a querystring// and the customer as the body.[HttpPut("{id:int}")]publicasync Task<IActionResult> UpdateAsync([FromComposite] ExampleRequest request,
CancellationToken cancellationToken){// your controller implementation}// example call to controller
UserDto user =new(){ FirstName ="John", LastName ="Smith"};HttpResponseMessageresponse=await client.PostAsJsonAsync("example/1?replace=true", user,default);