如何发送像Magento一样的Ajax请求

时间:2013-06-14 04:56:04

标签: php magento

我在Magento管理员中调试。当我在表/网格中搜索/过滤时,它会发送一个没有参数的ajax请求,但它仍然正确。他们如何做到这一点,在哪里获取数据进行搜索/过滤?

Request URL:http://192.168.1.29/magento/index.php/admincp/customer/grid/key/09469734cfa212fcbeea780d83672fa3/filter/bmFtZT1zeiZjdXN0b21lcl9zaW5jZSU1QmxvY2FsZSU1RD1lbl9VUw==/?ajax=true&isAjax=true
Request Method:POST
Status Code:200 OK
Request Headersview parsed
POST /magento/index.php/admincp/customer/grid/key/09469734cfa212fcbeea780d83672fa3/filter/bmFtZT1zeiZjdXN0b21lcl9zaW5jZSU1QmxvY2FsZSU1RD1lbl9VUw==/?ajax=true&isAjax=true HTTP/1.1
Host: 192.168.1.29
Connection: keep-alive
Content-Length: 44
Accept: text/javascript, text/html, application/xml, text/xml, */*
X-Prototype-Version: 1.7
Origin: http://192.168.1.29
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36
Content-type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://192.168.1.29/magento/index.php/admincp/customer/index/key/84d12064a10d7bbefb735e8d1e3db74b/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Cookie: frontend=6rp4ia821dqe6i6q2h4lmtovk7; adminhtml=jinn3k6khrc1u7te4s9cq4pui5
Query String Parametersview parsed
ajax=true&isAjax=true
Form Dataview parsed
internal_customer=&form_key=eUx2oZyidqOwcPdf

1 个答案:

答案 0 :(得分:1)

您的请求中有filter参数,其中包含base64值filter/bmFtZT1zeiZjdXN0b21lcl9zaW5jZSU1QmxvY2FsZSU1RD1lbl9VUw==。 当然,它从表格中获取参数。

您还可以通过系统/配置/高级/管理/安全性/添加URL的密钥来禁用magento admin的密钥,这有助于您调查管理面板。