• Hello,

    I wonder why the [‘json’] key (containing $json_response) was removed from the return array of ‘http_request’ in ‘Object_Sync_Sf_Salesforce’ class (classes/salesforce.php) on newest versions of the plugin?

    I use it to get raw data from ‘sobjects/ContentVersion/MyDocumentId/VersionData’ and then put on a file (with file_put_contents()) to use WordPress attachment process.

    Is it for performance?
    In this case, could the ‘json’ key be optional in the returned array, on setting something in $options array for example?

    Thanks,
    Yannick

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @yanlep Right, I removed it to try to make the cache less likely to be overwhelmed. But I can see the reason for this as you say.

    What I think I’ll do in the next version is make json and array and both possible values in the $options array. This way, as you say, developers can set the value for what they’d like to receive, and if they don’t want the large array they could leave it out of the cache.

    I do have a few other things I’m working on for the next small version, but when I get those things ready I will release this as part of it. Hopefully this week or next week.

    Hopefully you can use json_encode on the array in the meantime?

    Thread Starter Yannick Lepetit

    (@yanlep)

    Hello and thank you for your answer.
    Actually I tried to use the json_encode on the array but I received nothing!
    As I don’t know why, I decide to put again the [‘json’] line on the return array. It works for now. I’ll do changes when the new version will be available.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @yanlep here’s a pull request if you are inclined to test it. I’ll merge it and update the plugin when I can devote more time to testing it, and when I can finish other things for this release. But would be great if you’d like to test and see if it meets your need.

    Thread Starter Yannick Lepetit

    (@yanlep)

    I just did it and it works!

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    Great. I’ll put that in an update as soon as I can.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘‘json’ key return removed on Object_Sync_Sf_Salesforce->http_request()?’ is closed to new replies.