From 3f6a9d5bdfc2620ec2056edc52f2ee13ec1023db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 5 Nov 2021 16:38:05 +0300 Subject: [PATCH] Update POST.md --- docs/en/Blog-Posts/2021-11-02 v5_0_Beta/POST.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/en/Blog-Posts/2021-11-02 v5_0_Beta/POST.md b/docs/en/Blog-Posts/2021-11-02 v5_0_Beta/POST.md index b74ee95f6e..b370b98eae 100644 --- a/docs/en/Blog-Posts/2021-11-02 v5_0_Beta/POST.md +++ b/docs/en/Blog-Posts/2021-11-02 v5_0_Beta/POST.md @@ -82,7 +82,17 @@ abp generate-proxy -t csharp -u https://localhost:44305 ![csharp-proxies](csharp-proxies.png) -Once the proxies are generated, you can inject and use the application service interfaces of these proxies, like `IProductAppService` in this example. Usage is same of the [dynamic C# client proxies](https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients). +The next step is to enable the static proxy system for your application (or module) using the `AddStaticHttpClientProxies` extension method: + +````csharp +context.Services.AddStaticHttpClientProxies( + typeof(MyApplicationContractsModule).Assembly +); +```` + +You can then inject and use the application service interfaces of these proxies. The usage is same of the [dynamic C# client proxies](https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients). + +When you use static proxies for a module / application, you don't need to dynamic proxies. Find and remove the `context.Services.AddHttpClientProxies(...)` in your solution (typically in the `*.HttpApi.Client` project). #### Creating JavaScript client proxies