asarkar / feign Goto Github PK
View Code? Open in Web Editor NEWHTTP(S) Stub Server
License: Apache License 2.0
HTTP(S) Stub Server
License: Apache License 2.0
Expected:
If individual values are invalid in the YAML config file, those are discarded, preferably with warning logs, but the rest of the mapping is not affected.
Actual:
Invalid header values (not surrounded by quotes) cause the whole mapping to be discarded.
responses:
-
status: 200
headers:
pairs:
cache-control: no-cache
content-type: application/json; charset=utf-8
expires: -1
pragma: no-cache
server: Microsoft-IIS/8.0
set-cookie: ARRAffinity=6989538395f4f4ee1b5bb8ed95fdab337b34596b6ab0bae1291e54c6253d7510;Path=/;Domain=sandboxdaivb.azurewebsites.net
x-aspnet-version: 4.0.30319
x-powered-by: ASP.NET
Warning in log:
2016-12-15 01:03:26.785 [WARN ] p.c.s.n.NettyModelConversion.apply - Content-Type set both in header (application/json; charset=utf-8) and attached to entity (application/json), ignoring content type from entity. To remove this warning, use Result.as(...) to set the content type, rather than setting the header manually.
Recorded request:
{
"request": {
"path": "/header",
"method": "POST",
"queries": {
"location": ["seattle"]
},
"headers": {
"X-Passthrough-Xxx": "xxx",
"Connection": "keep-alive",
"Content-Length": "16",
"Accept": "application/json",
"Content-Type": "application/json",
"Accept-Charset": "UTF-8",
"Accept-Language": "zh",
"Accept-Encoding": "identity",
"User-Agent": "Java/1.8.0_66",
"Host": "localhost:9000"
}
},
"id": "header-1836696444"
}
Feign mapping:
responses:
-
status: 200
headers:
pairs:
cache-control: 'no-cache'
content-type: 'application/json; charset=utf-8'
expires: '-1'
pragma: 'no-cache'
server: 'Microsoft-IIS/8.0'
set-cookie: 'ARRAffinity=6989538395f4f4ee1b5bb8ed95fdab337b34596b6ab0bae1291e54c6253d7510;Path=/;Domain=sandboxdaivb.azurewebsites.net'
x-aspnet-version: '4.0.30319'
x-powered-by: 'ASP.NET'
body:
raw: '{ "ContentUrl": "http://dummycontentprovider.com/getContent" }'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.