Performance Problem Invoke REST-API

Completado Publicado hace 5 años Pagado a la entrega
Completado

I am invoking some REST services from codeigniter 3.x on this site [login to view URL] the request that I make using this code is very slow (10 seconds aprox) both front-end and back-end are in the same server, but the performance is very slow.

/*********************Call-Api****************************/

public function callApi($url, $post_data=array()){

$str_data = json_encode($post_data);

$ch = curl_init($url);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_POSTFIELDS,$str_data);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

$headers[] = 'Accept: application/json';

$headers[] = 'Content-Type: application/json';

$headers[] = 'Content-length: 0';

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);

curl_close($ch); // Seems like good practice

return json_decode($result);

}

The API REST is here:

[login to view URL]

When I try this same request in POSTMAN the response time is very fast (attach image), could you help me that I am doing wrong please.

Codeigniter JSON PHP RESTful Web Hosting

Nº del proyecto: #17521585

Sobre el proyecto

8 propuestas Proyecto remoto Activo hace 5 años

Adjudicado a:

xiongjiezhao222

Hi, My name is Xiong Jie Zhao, live in China. I am a newbie in this guru, but I have a lot of experiences with web development. I found your bug already. Let you know when you hire me. Regards

$16 USD / hora
(18 comentarios)
4.7

8 freelancers están ofertando un promedio de $19 / hora por este trabajo

seefattechnologi

Hey!! Greeting of the day!! I am ready to resolve the Performance Problem Invoke REST.I have checked your attached file also and i am ready to do this task for you. Skills:-Codeigniter, JSON, PHP, RESTful, Web Más

$16 USD / hora
(38 comentarios)
5.7
sun0815

Dear client I have read your issues and I can solve your issue in the short time There maybe 3 problems for it 1/ Page rendering problem 2/ The parsing data after the apis work and get the response 3/ Other issues Más

$22 USD / hora
(40 comentarios)
6.2
mandavcon

Hi, I have been doing Mobile & Web development for the past 11+ years, I have plenty of experience and a great eye for software development. I had completed all job perfectly on Freelancer.com. I am proud of my 100 Más

$22 USD / hora
(4 comentarios)
4.4
JohnNetworking

I am working as a senior web developer for 5 years. Dont worry, you will never waste your time. I hope full star and credit, but dont want much money. I am sure we will complete our project successfully. Thanks

$15 USD / hora
(9 comentarios)
3.7
krdesign1899

Hi there, Greetings!! I have 6 years of experience of Graphic Design, Logo Design, Web Design & Web Development,App Development. I can develop websites in different platforms like WORDPRESS, WO-Commerce, E-Commerce Más

$15 USD / hora
(1 comentario)
1.4