Skip to content

Commit c904450

Browse files
Allow REST declarative services to accept empty request bodies
1 parent 2b59444 commit c904450

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dotnet/src/dotnetcore/GxNetCoreStartup/Startup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ private void RegisterControllerAssemblies(IMvcBuilder mvcBuilder)
294294
{
295295
mvcBuilder.AddMvcOptions(options => options.Conventions.Add(new SetRoutePrefix(new RouteAttribute(VirtualPath))));
296296
}
297+
mvcBuilder.AddMvcOptions(options => options.AllowEmptyInputInBodyModelBinding = true);
297298
}
298299

299300
if (RestAPIHelpers.JsonSerializerCaseSensitive())

0 commit comments

Comments
 (0)