Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 3.1.8 JSON Post fails
#3

According to my host: I can confirm that file_get_contents and allow_url_fopen are enabled.
Then I tried your suggestion.


Code:
public function authorize(){
  if($this->input->is_ajax_request()) {
      echo "This is an Ajax request\n";
      $json = json_decode($this->input->raw_input_stream);
      var_dump($json);//NULL
      var_dump(json_decode(trim(file_get_contents('php://input')), true));//NULL
  }
}

I am also using the headers you suggested, see screen shot.
Any other ideas?

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Codeigniter 3.1.8 JSON Post fails - by pigfox - 05-12-2018, 08:58 PM
RE: Codeigniter 3.1.8 JSON Post fails - by pigfox - 05-13-2018, 10:58 AM
RE: Codeigniter 3.1.8 JSON Post fails - by pigfox - 05-13-2018, 02:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB