I swapped the JSON payload with a different one from https://jsonplaceholder.typicode.com/todos and modified the code to work with the different payload and it worked. I can only conclude that the initial payload is buggy.