You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The response body does not allow text/string responses. It only allows if it is double quoted. So when you put "ok" on the response, the respond will be the same with quotes. It should basically allow anything with or without quotes.
Suggestion
Currently the response's default 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.
Same with the 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.
Allow setting a cookie with specific path, domain, expiry and the option httponly, because currently, the cookies are always set to path=/ domain as localhost http false and empty expiry.
Do not allow multiple routes with the same path and same method, as this is redundant and your app will always use the first one declared.
Add HEAD method.
Standards
According to HTTP MethodsGETHEADOPTIONS 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:
Would also be nice to remove the X-Powered-By: Express on the response headers
The text was updated successfully, but these errors were encountered:
in the latest version of Mockman, the response can be default and only set to application/json , the response type will be variety in the future version.
Standard
the HEAD method has been added to the latest version.
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 beapplication/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 usingapplication/json
content-type.content-type
, if you want to set theAccess-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 optionhttponly
, because currently, the cookies are always set topath=/
domain aslocalhost
httpfalse
and emptyexpiry
.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 headersThe text was updated successfully, but these errors were encountered: