mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 20:30:50 +08:00 
			
		
		
		
	fix docs formatting for http method transformation
This commit is contained in:
		@@ -7,21 +7,21 @@ This achieved by setting the following ReRoute configuration:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
.. code-block:: json
 | 
					.. code-block:: json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					    {
 | 
				
			||||||
    "DownstreamPathTemplate": "/{url}",
 | 
					        "DownstreamPathTemplate": "/{url}",
 | 
				
			||||||
    "UpstreamPathTemplate": "/{url}",
 | 
					        "UpstreamPathTemplate": "/{url}",
 | 
				
			||||||
    "UpstreamHttpMethod": [
 | 
					        "UpstreamHttpMethod": [
 | 
				
			||||||
        "Get"
 | 
					            "Get"
 | 
				
			||||||
    ],
 | 
					        ],
 | 
				
			||||||
    "DownstreamHttpMethod": "POST",
 | 
					        "DownstreamHttpMethod": "POST",
 | 
				
			||||||
    "DownstreamScheme": "http",
 | 
					        "DownstreamScheme": "http",
 | 
				
			||||||
    "DownstreamHostAndPorts": [
 | 
					        "DownstreamHostAndPorts": [
 | 
				
			||||||
        {
 | 
					            {
 | 
				
			||||||
            "Host": "localhost",
 | 
					                "Host": "localhost",
 | 
				
			||||||
            "Port": 53271
 | 
					                "Port": 53271
 | 
				
			||||||
        }
 | 
					            }
 | 
				
			||||||
    ],
 | 
					        ],
 | 
				
			||||||
}
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The key property here is DownstreamHttpMethod which is set as POST and the ReRoute will only match on GET as set by UpstreamHttpMethod.
 | 
					The key property here is DownstreamHttpMethod which is set as POST and the ReRoute will only match on GET as set by UpstreamHttpMethod.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user