mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	Feature/inject error mapper (#562)
* added delegate to select last handler * #529 implemented a way we can inject the last delegating handler * wip - moving code * #529 removed loads of qos code and moved it into Ocelot.Provider.Polly * #529 can now inject http client expcetions to ocelot errors mappers and updated docs
This commit is contained in:
		@@ -5,7 +5,22 @@ Ocelot supports one QoS capability at the current time. You can set on a per ReR
 | 
			
		||||
want to use a circuit breaker when making requests to a downstream service. This uses the an awesome
 | 
			
		||||
.NET library called Polly check them out `here <https://github.com/App-vNext/Polly>`_.
 | 
			
		||||
 | 
			
		||||
Add the following section to a ReRoute configuration. 
 | 
			
		||||
The first thing you need to do if you want to use the administration API is bring in the relavent NuGet package..
 | 
			
		||||
 | 
			
		||||
``Install-Package Ocelot.Provider.Polly``
 | 
			
		||||
 | 
			
		||||
Then in your ConfigureServices method
 | 
			
		||||
 | 
			
		||||
.. code-block:: csharp
 | 
			
		||||
 | 
			
		||||
    public virtual void ConfigureServices(IServiceCollection services)
 | 
			
		||||
    {
 | 
			
		||||
        services
 | 
			
		||||
            .AddOcelot()
 | 
			
		||||
            .AddPolly();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
Then add the following section to a ReRoute configuration. 
 | 
			
		||||
 | 
			
		||||
.. code-block:: json
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user