PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → question on buffer and HTTPfunction
question on buffer and HTTPfunction
Iniciado por guest, 19,jun. 2016 02:33 - 3 respuestas
Publicado el 19,junio 2016 - 02:33
Hello gang !! I have 3 questions.

In windev 20 any sort of function like buffertostring (buffer variable) ?? Or how could i manipulate buffer variable.

Httpgetresult returns buffer or string. anyone know when it returns buffer and when it returns string ??

my_HttpRequest is httpRequest .
my_HttpRequest..content use Buffer Type. But my (PHP)webapi needs String . how to Process ??

Thanks!!?
Publicado el 19,junio 2016 - 13:22
Hi

to put a buffer in a string, just do:
MyString=MyBuffer

of course, this will work properly ONLY if the buffer content is a string

AFAIK, httpgetresult returns a string when the httprequest was done in get mode, and a buffer when it was done in post mode

As for the 3rd question, a buffer with a string content is just a string, so put your string in your buffer, how the httprequest sends it depends of the mode you are using (get or post).

Best regards
Publicado el 19,junio 2016 - 15:58
Thanks Fabrice !!
And how could I send Unicode string with HttpRequest POST method ?? When I send Ansi string everything works fine and When i pass unicode string everything goes wrong !!
Thanks Again !!
Publicado el 20,junio 2016 - 14:21
Hi again

I don't know what "goes wrong" means in your case. I can tell you that I'm sending unicode content in post mode all the time and there is nothing special to do... (in wxreplication, by example)

of course, it will work ONLY if the webservice receiving your call is actually WAITING for unicode content.

I cannot tell you more than that without seeing your code and reading the specs of the webservice

Best regards