Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

360
Views
Nuxtjs axios get status code from response from Rest API

I'm calling a Rest API that returns status codes. Some of them don't return Content in body. If i make in postman my calls i can get some status code like 202 Accepted, 200 OK... how can get it in Nuxtjs with axios. Any help would be very appreciated. enter image description here My code:

    async register() {
  const response = await this.$axios.$post('register/', {
  user: this.user,
  })
  console.log(response)
  // this.$nuxt.refresh()
  // this.status = response.status
  // if (this.status === 'register success') {
  //   this.$router.push('/login/')
  // }
}

and nothing show up :(

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think it should be "this.$axios.post". There is not such method as $post.

From the official docs:

axios.post('/user', {
firstName: 'Fred',
lastName: 'Flintstone'})
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!