level 1
ygtat
楼主
http请求如下
POST /user/passwd.json HTTP/1.1
Host: 192.168.150.140
Proxy-Connection: keep-alive
Content-Length: 15
Accept: */*
Origin: http://192.168.150.140
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://192.168.150.140/1.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
name=7777&city=111
上面有一条 X-Requested-With: XMLHttpRequest
如果post请求是跨域的,抓包时这条就没有了。。。。
查了半天没明白
能不能实现跨域请求,同时在http头上加上X-Requested-With: XMLHttpRequest
源代码 :http://www.w3school.com.cn/tiy/t.asp?f=jquery_ajax_post
2015年08月02日 09点08分
1
POST /user/passwd.json HTTP/1.1
Host: 192.168.150.140
Proxy-Connection: keep-alive
Content-Length: 15
Accept: */*
Origin: http://192.168.150.140
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://192.168.150.140/1.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
name=7777&city=111
上面有一条 X-Requested-With: XMLHttpRequest
如果post请求是跨域的,抓包时这条就没有了。。。。
查了半天没明白
能不能实现跨域请求,同时在http头上加上X-Requested-With: XMLHttpRequest
源代码 :http://www.w3school.com.cn/tiy/t.asp?f=jquery_ajax_post