WeChat third-party web page The post request becomes a GET request.

Source: Internet
Author: User
recently in the development of the third release page, now encountered a problem, when I use post from a to page B, the B page does not get the data that the post carries.
View request head Find method changed to get, ask what is the situation, how can I modify
The code is as follows:

Browser View Request head find post submit to get, ask what is the situation, how can I modify

Request URL:http://1535uf1143.iask.in/index.php?a=cso&code=031q5DH32yHVeJ07jHI3205CH32q5DHG&state=STATERequest Method:GETStatus Code:200 OKRemote Address:122.228.19.57:80

Reply content:

Recently in the development of the third release page, now encountered a problem, when I use post from a to page B, the B page does not get the data that the post carries.
View request head Find method changed to get, ask what is the situation, how can I modify
The code is as follows:

Browser View Request head find post submit to get, ask what is the situation, how can I modify

Request URL:http://1535uf1143.iask.in/index.php?a=cso&code=031q5DH32yHVeJ07jHI3205CH32q5DHG&state=STATERequest Method:GETStatus Code:200 OKRemote Address:122.228.19.57:80

To the B page has become get, that you accept the B page accept parameters to the way is get AH

Could have brokered one.

When you call post This method of your definition, be carefulpost("?a=cso",{serviceOrderJson :JSON.stringify(json),id:123});

Serious suspicion is that this parameter of yours is wrong. At least for now I'm copying your code to be able to run normally

Javascript

    var temp = document.createElement("form");    var PARAMS = [1, 2, 3, 4, 5];    var URL = '/test/wocaocao2';    temp.action = URL;    temp.method = "post";    temp.style.display = "none";    for (var x in PARAMS) {        var opt = document.createElement("textarea");        opt.name = x;        opt.value = PARAMS[x];        temp.appendChild(opt);    }    document.body.appendChild(temp);    temp.submit();

PHP Service Side

public function wocaocao2Action(){    var_dump($_POST);}

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.