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

171
Views
How do I change jquery ajaxForm to axios?

How do I change jquery ajaxForm to axios?

Now the following ajaxForm exists.

        $("#ccForm").ajaxForm({
            url: '/api/cc/registCcInfo',
            type: 'post',
            dataType: 'json',
            beforeSend: function (xhr) {
                xhr.setRequestHeader("Authorization", `Bearer ` + getCookie("deviceToken"));
            },
            success: function (response) {
                response.status = 200;
                response.data = {};
                response.data.resultCd = response.resultCd;
                response.data.resultMsg = response.resultMsg;
                modal.querySelector("button.close").click();

formData looks like this:

{
    "ccNo": "",
    "ccName": "aa",
    "ccAddress": "",
    "ccTel": "",
    "ccX": "",
    "ccY": "",
    "perPage": 10,
    "file": File
lastModified: 1642483829515
lastModifiedDate: Tue Jan 18 2022 14:30:29 GMT+0900 (Korean Standard Time) {}
name: "3683.jpg"
size: 195096
type: "image/jpeg"
webkitRelativePath: ""
[[Prototype]]: File
}

I want to change this data to axios at once. I can't figure out how the input type passes both text as well as file .

about 4 years ago · Juan Pablo Isaza
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!