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

187
Views
How to create an patch request with axios
axios.post('/api/v1/users',
            { "edited_field": "email", "email": email },
            { headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': crsfToken }, }
        ).then((response) => {
            // Code
        }).catch((error) => {
            // Code
        })

I have this post method, but i want to create an patch method of this. i have seen some solutions where they post a form with an input value='patch' but since im not using a form i have no idea how it must be done.

Any help is welcome :D

Thanks in advance!

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

0

Axios has a built-in patch method. You can modify the code you currently have by replacing axios.post with axios.patch

axios.patch('/api/v1/users',
            { "edited_field": "email", "email": email },
            { headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': crsfToken }, }
        ).then((response) => {
            // Code
        }).catch((error) => {
            // Code
        })
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!