mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	Change to fix issue not setting content type header
This commit is contained in:
		@@ -5,6 +5,7 @@
 | 
			
		||||
    using System.IO;
 | 
			
		||||
    using System.Linq;
 | 
			
		||||
    using System.Net.Http;
 | 
			
		||||
    using System.Net.Http.Headers;
 | 
			
		||||
    using System.Threading.Tasks;
 | 
			
		||||
 | 
			
		||||
    using Microsoft.AspNetCore.Http;
 | 
			
		||||
@@ -44,7 +45,11 @@
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            return new ByteArrayContent(await ToByteArray(request.Body));
 | 
			
		||||
            var content = new ByteArrayContent(await ToByteArray(request.Body));
 | 
			
		||||
 | 
			
		||||
            content.Headers.TryAddWithoutValidation("Content-Type", new[] {request.ContentType});
 | 
			
		||||
 | 
			
		||||
            return content;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private HttpMethod MapMethod(HttpRequest request)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user