How to see the response of a Jestor.curlCall

Hi guys! I’m using Jestor.curlCall to access an API, and I’m trying to see the response to the request. I’ve tried to show the variable that has the request Jestor.curlCall but it’s not showing anything. @marcos.figueiredo

image

Testing the request with Insomnia is shown the response:

image

Hey @vinimenezes

Thanks for reporting, I’ll send it to our team to analyze what’s going on!

@marcos.figueiredo I saw that was fixed and now is showing the results, but I have one more question. This picture is about the response to the request:

If I try to see just the id, for example, it’s showing nothing:
image

I think this could be a bug too.

Hey @vinimenezes

There may be two things happening.

One: $responseId is not an array, but an object. In this case, $responseId[‘id’] won’t work, it would be something like $responseId->id;

Two: it’s not an array, it’s a JSON or even a string. If that’s the case, you would have to treat the data. Like:

$responseArray = json_decode($responseId,true);

Then $responseId[‘id’] would work.

A good way of checking if it’s an array is outputting count($responseId). If it’s an array with more than one value, it should print something greater than 1.

1 Like