php - How do I resolve POST asp with REST-client on codeIgniter -
im lost please, how resolve following on codeigniter using rest-cliente library (rest).
i try send post, webapp or webresourse based on (asp.net), idea this:
getuser()
function getuser($id){ //set config of url $config = array('server' => 'http://www.example.com/app/webapp/); //initialize $this->rest->initialize($config); //now here problem @ im lost, try dont understand: $postdata = '__viewstate=/dkekcdmdaekekecnaekeqkenckje&'. '__eventvalidate=/dwrrkckadjeewwrjrdsjejew&'. 'buttonsearch=search&'. 'textfielduserid='.$id.'; $this->rest->option(curlopt_postfields, $postdata); $this->rest->post('query/user.apsx'); //when run this, use debug no show error, return content html of page whitout query of user data. $this->rest->debug();
note: user library rest , curl named within constructor. use request , work perfectly. want post
$this->load->library('curl'); $this->load->library('rest');
the library: https://github.com/philsturgeon/codeigniter-restclient
thanks.!!!
as stated in question:
//when run this, use debug no show error, return content html of page whitout query of user data.
$this->rest->debug();
so, if received html not desired data, problem server asking to. it's more sure you're not doing right request, weird because should show wrong.
other thing be, paste given answer? know errors, if any.
Comments
Post a Comment