How to get form data? for antd form form

if (newOptions.method = "POST" | | newOptions.method = "PUT") {

if (!(newOptions.body instanceof FormData)) {
  newOptions.headers = {
    Accept: "application/json",
    "Content-Type": "application/json; charset=utf-8",
    ...newOptions.headers
  };
  newOptions.body = JSON.stringify(newOptions.body);
} else {
  // newOptions.body is FormData
  newOptions.headers = {
    Accept: "application/json",
    ...newOptions.headers
  };
}
In the code example of

}
antd pro, there is a judgment about FormData
this.props.form.validateFields ((err, values) = > {})
values is a json object.
how to become FormData?

Mar.12,2021

this.props.form.validateFields((err, values) => {
  if (!err) {
    const data = new URLSearchParams(values);
    }
})



if (newOptions.method === "POST" || newOptions.method === "PUT") {
if (!(newOptions.body instanceof FormData) && !(newOptions.body instanceof URLSearchParams)) {
  newOptions.headers = {
    Accept: "application/json",
    "Content-Type": "application/json; charset=utf-8",
    ...newOptions.headers
  };
  newOptions.body = JSON.stringify(newOptions.body);
} else {
  // newOptions.body is FormData
  newOptions.headers = {
    Accept: "application/json",
    "Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
    ...newOptions.headers
  };
}

}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b383f1-4ed62.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b383f1-4ed62.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?