Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix unable to get url parameters

Discussion in 'Misc WordPress Requests' started by miladaslani, Nov 8, 2017.

  1. miladaslani


    unable to get url parameters, by miladaslani

    i had this code

    function testFunction($data) {
    $data["params"] = str_replace("\\", "", $data["params"]);
    $q = json_decode($data["params"], TRUE);

    return $q;

    add_action('rest_api_init', function () {
    register_rest_route('v3', '/page/test', array('methods' => 'GET', 'callback' => 'testFunction'));


    and when i request to
    I get this answer

    "year": "1396",
    "month": "8",
    "day": "17",
    "page": "4"

    but after I change my site protocol to ssl, I get null for url parameters
    my request url is :

    unable to get url parameters

Share This Page

Web Hosting