Fetching Parse.Relations using REST API call in PHP
===

Failing to compose a proper REST call for fetching relations on the Topic class using PHP. Both JS and curl calls work as a charm:

    curl -X GET -H "X-Parse-Application-Id: YOURAPPIDGOESGERE" 
    -H "X-Parse-REST-API-Key: YOURRESTAPIKEYGOESHERE" -G 
    --data-urlencode 'where={"$relatedTo":{"object":{"__type":"Pointer","className":
    "Topic","objectId":"3mvbwLh80q"},"key":"friend"}}'
    https://api.parse.com/1/classes/Email

Yet composing the PHP call returns a complete fetch of all objects of the Email class.

    {
       "className":"Email",
       "$relatedTo":{
          "object":{
             "__type":"Pointer",
             "className":"Topic",
             "objectId":"3mvbwLh80q"
          }
       },
       "key":"friend"
    }

Thanks for your help.