Skip to content
Advertisement

how to force space to %20 in http_build_query?

I am facing a problem, that the API endpoint expects one of parameters with %20 replacing one of the spaces. Example:

JavaScript

If I write 'scope' => 'api offline_access' the space gets translated to + sign when passing it to http_build_query() function.

If I keep it like it is above, the sign is “wrapped” with more signs

I tried to find this answer in the function manual, but with no luck

Advertisement

Answer

As @Paul replied :

JavaScript

According to php doc for enc_type parameter.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement