如何在基于位框架的应用程序中配置 web api 的 http 配置?
How can I configure web api's http configuration in bit framework based apps?
我已经使用以下代码配置了网络 api:
dependencyManager.RegisterWebApiMiddleware(webApiDependencyManager =>
{
webApiDependencyManager.RegisterWebApiMiddlewareUsingDefaultConfiguration();
});
如何自定义 http 配置?
如您所见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
});
});
我已经使用以下代码配置了网络 api:
dependencyManager.RegisterWebApiMiddleware(webApiDependencyManager =>
{
webApiDependencyManager.RegisterWebApiMiddlewareUsingDefaultConfiguration();
});
如何自定义 http 配置?
如您所见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
});
});