When applying rules from Request Class, If have any invalid element from user input we should return the error message
When entering an invalid value for a field (JSON input) I got the message "Welcome to Apiato"
Create sample container with API only
Just apply the rules in the requested Class
Note: I was run composer update/install and some repos have been updated...
I'm running Windows 10, PHP 7.2.3, OracleDB (Oci8)
I don't know why this happens??
Will try with the blank Apiato project without any modification
You may actually add the Accept : application/json header to the request.. can you try? This is most likely because your request does not contain required headers..
Regular web browser cannot add such headers, therefore it bypasses and routes to / ..
Cheers
Hello
Thanks for the fast reply, that fixed my problem... But I think we should check the headers to prevent this error...
I'm using Postman to test the API, for most other APIs they do not check for the missing "Accept" in headers but still return the error message.
There is an config flag that checks for this in a dedicated Middleware! Can
you check the docs?
vituocgia notifications@github.com schrieb am Sa., 24. März 2018, 12:39:
Hello
Thanks for the fast reply, that fixed my problem... But I think we should
check the headers to prevent this error...
I'm using Postman to test the API, for most other APIs they do not check
for the missing "Accept" in headers but still return the error message.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/apiato/apiato/issues/391#issuecomment-375877209, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AI_pNp92gRBgqkPAMb70M9p8g3_74dMMks5thjB1gaJpZM4S5sbX
.
Yes, I saw it :)
http://docs.apiato.io/getting-started/requests/#send-http-req
I'll close this.. if you have additional questions, please ask..
Cheers
Most helpful comment
You may actually add the
Accept : application/jsonheader to the request.. can you try? This is most likely because your request does not contain required headers..Regular web browser cannot add such headers, therefore it bypasses and routes to
/..Cheers