D
D
Dim2020-04-29 18:47:10
API
Dim, 2020-04-29 18:47:10

Why does the GET request come in this way?

I use the built-in ability of Bitrix to send hooks.
It is necessary to send a multi-line text using GET to the postchat.php handler. I
generated a line like this in the chrome browser

postchat.php?message=Первая строка%0A Вторая строка

When sent to the handler comes:
Array
(
   [message] => Первая строка
Вторая строка
)


It can be seen that the line break works fine.

Now I'm doing the same hook from Bitrix, it comes to the handler

Array
(
   [message] => Первая строка %0A Вторая строка
)


I don’t understand where the dog is buried and how to form a request so that the hook from Bitrix is ​​transmitted in such a format that the handler understands that there are several lines.

The handler code cannot be changed, I can only work with the hook body.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
serginhold, 2020-04-29
@serginhold

no code, no idea how the array was received, but if anything, https://www.php.net/manual/en/function.urldecode.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question