When $assoc param is true, returned objects will be converted into associative arrays.
Currently, GET responses return objects (StdClass). Should developers need an array (which is likely), they will have to convert the object into an array manually. So, in order avoid this, I added the $assoc param to return data as array.
I just did it for GET method, but it can be extended to PUT, POST and DELETE as well
When
$assoc
param istrue
, returned objects will be converted into associative arrays. Currently, GET responses return objects (StdClass). Should developers need an array (which is likely), they will have to convert the object into an array manually. So, in order avoid this, I added the$assoc
param to return data as array. I just did it for GET method, but it can be extended to PUT, POST and DELETE as well