Send parameters via get request

Hello everybody! I am trying to use http request function. I need to send some parameters (string variable value) in the query, if I send a word it works fine, but above a word it doesn't work. Am I doing something wrong?

I have an http request action that sends the "message" parameter to my php script, my script receives the query, processes it and resends it via webhook to me.
 

Attachments

  • http_request.macro
    4.9 KB · Views: 24

Dimlos

Well-known member
I set up a local PHP server and verified the problem.
The problem is very simple: the query parameter contains spaces, so it doesn't work.

I'm not familiar with PHP, so I'll leave it to you to figure out how to implement it, but it requires URL encoding.
Try replacing the spaces with %20 or +. It will work.
 

Dimlos

Well-known member
One other thing I was wondering is whether http requests and webhooks can be cycled and become an endless loop.
Please be aware that infinite loops can overload the server.
 
I set up a local PHP server and verified the problem.
The problem is very simple: the query parameter contains spaces, so it doesn't work.

I'm not familiar with PHP, so I'll leave it to you to figure out how to implement it, but it requires URL encoding.
Try replacing the spaces with %20 or +. It will work.

I discovered this too. After I used the url_encode then it worked. Thank you very much!
 

Dimlos

Well-known member
I'm glad we were able to solve the problem.
Because I started with zero knowledge of PHP and it took me a whole day to figure it out.
 
Top