matthiasnoback / microsoft-translator

PHP library for making calls to the Microsoft Translator V3 API
MIT License
39 stars 26 forks source link

Build HTTP queries specifically with '&' #4

Closed paazmaya closed 10 years ago

paazmaya commented 10 years ago

http_build_query($requestParameters, null, '&'); instead of http_build_query($requestParameters);

By default http_build_query uses php.ini value arg_separator.output which in most cases is & in order to make HTML valid, thus failing the request.

http://php.net/manual/en/function.http-build-query.php

matthiasnoback commented 10 years ago

Seems like a good suggestion. This problem was not reported before, but I think it makes sense.