如何在基于位框架的应用程序中配置web api的http配置?

时间:2017-07-23 09:10:38

标签: asp.net-web-api owin bit-framework

我已使用以下代码配置了网络API:

dependencyManager.RegisterWebApiMiddleware(webApiDependencyManager =>
{
    webApiDependencyManager.RegisterWebApiMiddlewareUsingDefaultConfiguration();
});

如何自定义http配置?

1 个答案:

答案 0 :(得分:2)

正如您在https://docs.bit-framework.com/docs/bit-server-side/web-api.html#getting-started

中所看到的

你可以写:

dependencyManager.RegisterWebApiMiddleware(webApiDependencyManager =>
{
    webApiDependencyManager.RegisterWebApiMiddlewareUsingDefaultConfiguration();

    webApiDependencyManager.RegisterGlobalWebApiCustomizerUsing(httpConfiguration =>
    {
        // You've access to web api's http configuration here
    });
});