public function getResponse(LbsRequest $request) { $this->log->LogDebug("Request: " . $request->toJson()); $ch = curl_init($request->getServer()); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); curl_setopt($ch, CURLOPT_POSTFIELDS, $request->toJson()); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $this->log->LogDebug("Response:" . $response); curl_close($ch); return $response; }