lancegin / mockman Goto Github PK
View Code? Open in Web Editor NEWManage and start the mock servers on your local platform easily
License: GNU Affero General Public License v3.0
Manage and start the mock servers on your local platform easily
License: GNU Affero General Public License v3.0
Mockman does not allow setting query parameters on the path section. If you add a query parameter, the path does not work.
An example:
Side to side screenshot of Mockman as the mock server and Postman as the client.
Suggestion:
Bug
"ok"
on the response, the respond will be the same with quotes. It should basically allow anything with or without quotes.Suggestion
content-type
is set to be application/json
, I know most apis responds with this type, but is not always the case. Its ok to have this as default, but i suggest that you automatically add/include it on the headers section, so user knows that it is using application/json
content-type.content-type
, if you want to set the Access-Control-Allow-Origin
to *
then add/include it on the headers section so users knows that it is using it.path
, domain
, expiry
and the option httponly
, because currently, the cookies are always set to path=/
domain as localhost
http false
and empty expiry
.HEAD
method.Standards
GET
HEAD
OPTIONS
do not accept body parameters. So do not allow setting of body parameters for those routes.If you accept PRs I'd be happy to look into some of them. Cheers!
Edit:
X-Powered-By: Express
on the response headersExport Feature:
Export Server and all Routes
Export Individual Routes
Import Feature:
Import Server and all routes
Import Individual Routes
This would be a great feature set for collaboration between teams
in our interface definition specification, there can be dynamic parameters in the url of the get request method. Excuse me, in such a scenario, how should I use Mockman to simulat data?
For Example
Method: GET
URL: /files/download/{resourceCode}/{other dynamic params}
Swagger
the resourceCode in the url is a variable, which is generated according to the front-end user's choice
When you set a header on the Request
tab with something like X-Custom-Token
and the client requests with a header of either X-Custom-Token
or x-custom-token
, Mockman will not recognize any of those. Check the postman screenshot below.
Capitalized first letter header
Lower-cased header
As according to the official specs rfc7231
3.2. Header Fields
Each header field consists of a case-insensitive field name followed
by a colon (":"), optional leading whitespace, the field value, and
optional trailing whitespace.
Therefor, Mockman should accept valid header fields regardless of its letter-case.
Note:
Mockman accepts case-insensitive headers only if the header on the Request
is set to all lower-case.
Dynamic responses
I'd like to request additional feature to be able to mock a server and respond dynamically based on parameters.
Excample scenario of this request:
localhost:3000/api/getinfo
with a params of user
{ "success": true, "data": $user }
data
part on the given json based on the given params.Custom error response
{"errors":[{"key":"user","details":"required params."}]}
Advance Logging
Thanks!
It would be great to have option to clear Logger view ether through menu or using a button on Logger view.
Hi,
Is it possible that create a folder which store all fake api in project, and then it can be git track and share to team use?
THanks :)
Building from source on windows platform (Windows 10 x64), npm run build
return this error:
Expected linebreaks to be 'LF' but found 'CRLF'
Adding the following rules to .eslintrc
file fix the issue:
'rules': {
"linebreak-style": 0,
"eslint linebreak-style": [0,"error","windows"],
...
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.