Skip to content
Advertisement

Tag: bad-request

400 BAD REQUEST when POST using Axios in React

Can any help me with this? I keep getting a 400 bad request from Axios. I can pass a GET request and confirm its working fine. I create http-common.js file with following code: Then,I create a service that uses axios object above to send HTTP requests. TodoService.js Then, I use TodoDataService.create(data) … in AddTodos component. AddTodos.js When clicked Submit it’s

How to test a bad request in cypress

I am testing logging in POST method in cypress with incorrect credentials. this returns 400 bad requests which I need to test. This is what I have: The request that was sent: This is the response I get: I’d like to know what is in the response or body Answer The answer to your question is in the error message:

Advertisement