我正在使用 API 发送 x-www-form-urlencoded 类型的数据,就像这样
{
"--------------------------b293caf16a07c90a\r\nContent-Disposition: attachment; name": "\"api_key\"\r\n\r\2d5d4f4f4d5d6f4d5f4d4f5\r\n--------------------------b293caf16a07c90a\r\nContent-Disposition: attachment; name=\"invoice_key\"\r\n\r\nYAtFRHOTxeONJYP\r\n--------------------------b293caf16a07c90a\r\nContent-Disposition: attachment; name=\"invoice_id\"\r\n\r\n1020984\r\n--------------------------b293caf16a07c90a\r\nContent-Disposition: attachment; name=\"payment_method\"\r\n\r\nFawry\r\n--------------------------b293caf16a07c90a\r\nContent-Disposition: attachment; name=\"invoice_status\"\r\n\r\npending\r\n--------------------------b293caf16a07c90a\r\nContent-Disposition: attachment; name=\"referenceNumber\"\r\n\r\n991008287\r\n--------------------------b293caf16a07c90a\r\nContent-Disposition: attachment; name=\"pay_load\"\r\n\r\nFTest\r\n--------------------------b293caf16a07c90a--\r\n"
}
有没有办法(如 npm 包)将此数据转换为 Javascript 对象或 JSON 以在我的网站中使用它?