Closed levinthiel closed 2 days ago
As a Developer
I want to check the contrast ratio via an API when colors are added or edited
in order to ensure accessibility compliance.
https://github.com/neuefische/web-react-recap-project/assets/93415777/acb2b6f6-6a34-4300-957b-b766de773c7f
This is how you can send data to an API, it is called a post request.
async function postFetch() { const response = await fetch( "https://www.some-api-url.com/api", { method: "POST", body: JSON.stringify({ cool: true }), headers: { "Content-Type": "application/json", }, } ); }
(*)so I had a thinking issue, I had to check ALL the colors in the array and keep the constrast check up to date so my initial path was completely wrong (but funny enough the function kinda worked)
As a Developer
I want to check the contrast ratio via an API when colors are added or edited
in order to ensure accessibility compliance.
https://github.com/neuefische/web-react-recap-project/assets/93415777/acb2b6f6-6a34-4300-957b-b766de773c7f
Acceptance Criteria
Tasks
Hint
This is how you can send data to an API, it is called a post request.