@ -128,41 +128,41 @@ namespace Volo.Abp.Http.Client.DynamicProxying
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  async  Task < string >  MakeRequestAsync ( IAbpMethodInvocation  invocation ) 
        private  async  Task < string >  MakeRequestAsync ( IAbpMethodInvocation  invocation ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            using  ( var  client  =  HttpClientFactory . Create ( ) ) 
            var  clientConfig  =  ClientOptions . HttpClientProxies . GetOrDefault ( typeof ( TService ) )  ? ?  throw  new  AbpException ( $"Could not get DynamicHttpClientProxyConfig for {typeof(TService).FullName}." ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					            { 
            var  remoteServiceConfig  =  RemoteServiceOptions . RemoteServices . GetConfigurationOrDefault ( clientConfig . RemoteServiceName ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                var  clientConfig  =  ClientOptions . HttpClientProxies . GetOrDefault ( typeof ( TService ) )  ? ?  throw  new  AbpException ( $"Could not get DynamicHttpClientProxyConfig for {typeof(TService).FullName}." ) ; 
 
			
		
	
		
		
			
				
					
					                var  remoteServiceConfig  =  RemoteServiceOptions . RemoteServices . GetConfigurationOrDefault ( clientConfig . RemoteServiceName ) ; 
 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                var  action  =  await  ApiDescriptionFinder . FindActionAsync ( remoteServiceConfig . BaseUrl ,  typeof ( TService ) ,  invocation . Method ) ; 
            var  client  =  HttpClientFactory . Create ( clientConfig . RemoteServiceName ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                var  apiVersion  =  GetApiVersionInfo ( action ) ; 
 
			
		
	
		
		
			
				
					
					                var  url  =  remoteServiceConfig . BaseUrl  +  UrlBuilder . GenerateUrlWithParameters ( action ,  invocation . ArgumentsDictionary ,  apiVersion ) ; 
 
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                var  requestMessage  =  new  HttpRequestMessage ( action . GetHttpMethod ( ) ,  url ) 
            var  action  =  await  ApiDescriptionFinder . FindActionAsync ( remoteServiceConfig . BaseUrl ,  typeof ( TService ) ,  invocation . Method ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                { 
            var  apiVersion  =  GetApiVersionInfo ( action ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                    Content  =  RequestPayloadBuilder . BuildContent ( action ,  invocation . ArgumentsDictionary ,  JsonSerializer ,  apiVersion ) 
            var  url  =  remoteServiceConfig . BaseUrl  +  UrlBuilder . GenerateUrlWithParameters ( action ,  invocation . ArgumentsDictionary ,  apiVersion ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                } ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                AddHeaders ( invocation ,  action ,  requestMessage ,  apiVersion ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                await  ClientAuthenticator . Authenticate ( 
 
			
		
	
		
		
			
				
					
					                    new  RemoteServiceHttpClientAuthenticateContext ( 
 
			
		
	
		
		
			
				
					
					                        client , 
 
			
		
	
		
		
			
				
					
					                        requestMessage , 
 
			
		
	
		
		
			
				
					
					                        remoteServiceConfig , 
 
			
		
	
		
		
			
				
					
					                        clientConfig . RemoteServiceName 
 
			
		
	
		
		
			
				
					
					                    ) 
 
			
		
	
		
		
			
				
					
					                ) ; 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                var  response  =  await  client . SendAsync ( requestMessage ,  GetCancellationToken ( ) ) ; 
            var  requestMessage  =  new  HttpRequestMessage ( action . GetHttpMethod ( ) ,  url ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            { 
 
			
		
	
		
		
			
				
					
					                Content  =  RequestPayloadBuilder . BuildContent ( action ,  invocation . ArgumentsDictionary ,  JsonSerializer ,  apiVersion ) 
 
			
		
	
		
		
			
				
					
					            } ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                if  ( ! response . IsSuccessStatusCode ) 
            AddHeaders ( invocation ,  action ,  requestMessage ,  apiVersion ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                { 
 
			
		
	
		
		
			
				
					
					                    await  ThrowExceptionForResponseAsync ( response ) ; 
 
			
		
	
		
		
			
				
					
					                } 
 
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                return  await  response . Content . ReadAsStringAsync ( ) ; 
            await  ClientAuthenticator . Authenticate ( 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                new  RemoteServiceHttpClientAuthenticateContext ( 
 
			
		
	
		
		
			
				
					
					                    client , 
 
			
		
	
		
		
			
				
					
					                    requestMessage , 
 
			
		
	
		
		
			
				
					
					                    remoteServiceConfig , 
 
			
		
	
		
		
			
				
					
					                    clientConfig . RemoteServiceName 
 
			
		
	
		
		
			
				
					
					                ) 
 
			
		
	
		
		
			
				
					
					            ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            var  response  =  await  client . SendAsync ( requestMessage ,  GetCancellationToken ( ) ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            if  ( ! response . IsSuccessStatusCode ) 
 
			
		
	
		
		
			
				
					
					            { 
 
			
		
	
		
		
			
				
					
					                await  ThrowExceptionForResponseAsync ( response ) ; 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					        } 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            return  await  response . Content . ReadAsStringAsync ( ) ; 
 
			
		
	
		
		
			
				
					
					        }  
 
			
		
	
		
		
			
				
					
					        
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  ApiVersionInfo  GetApiVersionInfo ( ActionApiDescriptionModel  action ) 
        private  ApiVersionInfo  GetApiVersionInfo ( ActionApiDescriptionModel  action ) 
 
			
		
	
		
		
			
				
					
					        { 
        {