【问题标题】:How can I configure web api's http configuration in bit framework based apps?如何在基于 bot 框架的应用程序中配置 web api http 配置?
【发布时间】:2017-07-24 15:28:49
【问题描述】:

我已经使用以下代码配置了 web api:

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

如何自定义http配置?

【问题讨论】:

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


    【解决方案1】:

    正如您在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
        });
    });
    

    【讨论】:

      猜你喜欢
      • 2018-07-04
      • 2013-01-22
      • 1970-01-01
      • 1970-01-01
      • 2023-03-12
      • 1970-01-01
      • 2011-07-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多