0

I have a problem wit sending JSON object as a parameter to my post API

I get 404

const params = {"id": 1, "title" : "x"}

  axios({
    method: 'post',
    url: '......',
    data: params
    }).then((data)=>{
        console.log('success')
    }).catch((error)=>{
        console.error();
    });

1
  • Please add the specific problem to your question with any error messages that you receive. Commented Apr 29, 2019 at 21:16

1 Answer 1

1

There is nothing wrong with your code. Api resource that you want to access is not there causing 404 Not Found Error. Go through your api resources and see if your requested resource is present or not. Some servers are very specific regarding /. e.g. /users may not match /users/ and vice versa.

Sign up to request clarification or add additional context in comments.

1 Comment

Awesome, Have a great day :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.