Comments (6)
@MichielDeMey I've had a brief discussion with my colleagues about this and we feel that making the header matching less strict would complicate the rules around response/request pair matching.
I think that being specific with the headers allows you to get a more predictable response from Drakov.
from drakov.
Makes sense, however, does Drakov currently support use-case 1 (example suplied)?
In that case I can define a response without an active header and treat that as the default response.
from drakov.
Yep, absolutely.
We have a test Blueprint file we test against to ensure behaviours against headers:
https://github.com/Aconex/drakov/blob/master/test/example/md/headers.md
Let me know if you have any trouble with the headers 👍
from drakov.
Just tested this, works as expected. :)
Simply specifying a response without a header will treat it as the default response in case a header is not present.
from drakov.
Just a quick thought, but would it not make sense to at least return something besides a 404? Technically the resource IS found, it's just the request was incorrect...
from drakov.
Returning something other than a 404 would be a lot more useful, simply getting 404's back doesn't provide any useful information about what is actually wrong.
from drakov.
Related Issues (20)
- Express server callback is not called after switching to 'drafter' HOT 1
- Discover option does not work HOT 1
- Incompatibility with body-parser HOT 3
- Remove Wiki tab HOT 1
- Can not match body request when Content-Type is x-www-form-urlencoded HOT 2
- URI conflict HOT 2
- Could not load the Visual C++ component "VCBuild.exe". To fix this HOT 2
- CLI option `--ignoreHeader` causes error HOT 1
- Missing URI parameters on mock advanced API Blueprint resources HOT 4
- stealthmode does not disable all output HOT 1
- Error on ignoreHeader command line argument HOT 3
- Docker HOT 1
- Send parameter value in body
- Dump all request data
- Share the project with community HOT 12
- ignoreHeader error, TypeError: ignoreHeaders.map is not a function HOT 1
- Add package-lock.json to the repo
- Use release-it for release/distribution
- public option not working HOT 5
- "Endpoint not found"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drakov.