这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1.3 KiB

LINGYUN.Abp.Http.Client.Wrapper

HTTP client wrapper module for automatically adding wrapper request headers in HTTP client requests.

简体中文

Features

  • Automatic addition of wrapper request headers
  • Integration with ABP HTTP client
  • Support for global wrapper configuration

Installation

dotnet add package LINGYUN.Abp.Http.Client.Wrapper

Configuration

[DependsOn(typeof(AbpHttpClientWrapperModule))]
public class YouProjectModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpWrapperOptions>(options =>
        {
            // Enable wrapper
            options.IsEnabled = true;
        });
    }
}

How It Works

When the wrapper is enabled (AbpWrapperOptions.IsEnabled = true), the module automatically adds the _AbpWrapResult header to all HTTP client requests. When the wrapper is disabled (AbpWrapperOptions.IsEnabled = false), the module automatically adds the _AbpDontWrapResult header to all HTTP client requests.

This ensures that the HTTP client request results remain consistent with the server-side wrapper configuration.

Source Code

LINGYUN.Abp.Http.Client.Wrapper