Your code looks correct.
But since it’s a screenshot I can’t copy and paste it to test it.
The http_build_query is redundant but that won’t have caused a boolean return.
Comparing your code to my code example
I don’t see anything obviously wrong. But again, screenshot, I can’t copy and paste it to test.