Subversion Repositories SmartDukaan

Rev

Rev 13993 | Rev 14016 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13993 Rev 13994
Line 137... Line 137...
137
		curl_setopt($ch,CURLOPT_RETURNTRANSFER , true);
137
		curl_setopt($ch,CURLOPT_RETURNTRANSFER , true);
138
		if(!empty($fields)) {
138
		if(!empty($fields)) {
139
			curl_setopt($ch,CURLOPT_POSTFIELDS, $fields);
139
			curl_setopt($ch,CURLOPT_POSTFIELDS, $fields);
140
			curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
140
			curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
141
			    'Content-Type: application/json',                                                                                
141
			    'Content-Type: application/json',                                                                                
142
			    'Content-Length: ' . sizeof($fields))                                                                       
142
			    // 'Content-Length: ' . sizeof($fields))                                                                       
143
			    //'Content-Length: ' . strlen($fields))                                                                       
143
			    'Content-Length: ' . strlen($fields))                                                                       
144
			);   
144
			);   
145
		}
145
		}
146
		//execute post
146
		//execute post
147
		$result = curl_exec($ch);
147
		$result = curl_exec($ch);
148
		$this->log("[response] ".print_r($result,1),'api');
148
		$this->log("[response] ".print_r($result,1),'api');