Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Jahr, 7 Monaten
Letzter Beitrag:
vor 1 Jahr, 7 Monaten
Beteiligte Autoren:
Jim Carson, Jose Antonio Garrido, Fabrice Harari, Paulo Oliveira

cURL and WD21

Startbeitrag von Jim Carson am 26.10.2016 13:12

Has anyone used cURL with Windev to process HTTPrequest's. If so, any hints?


Hi Jim

why would we do that? Why not use the native httprequest/httpgetresult/httpform functions?

Best regards

von Fabrice Harari - am 26.10.2016 13:52
I have tried these. The problem is the header that is sent (I think). I can't figure out how to see all of the HTTPrequest details. (Header, Body) The header that is sent is the issue. When I try to get info on the request, I get the error "An element of 'httpRequest' type cannot be converted to the 'ANSI string' type.". From within the ide can I preview the data that is being sent.

EDIT: I am getting a 403 Forbidden error when I submit the request via HTTPsend.

von Jim Carson - am 26.10.2016 14:28
did you use one httpRequest/httpResponse variables and HTTPSend function?

what is in the Content,Header and Method properties?


von Paulo Oliveira - am 26.10.2016 17:05
Jim Carson
I can't figure out how to see all of the HTTPrequest details

You can use a too likel wireshark, as Fabrice said in another post. It's free and easy to use.

Another way to monitor is to create a socket within windev with SocketCreate() and then send the httprequest to yourself
You can trace the content received by using trace()

So this request (from windev online help):

cMyRequest is httpRequest
cMyRequest..URL = "" //5010 is the port is the port I chosed in SocketCreate()
cMyResponse is httpResponse = HTTPSend(cMyRequest)

Shows this trace window:

GET / HTTP/1.1User-Agent: PC SOFT FrameworkHost: */*

This is the code used to create the socket:


Apart from monitoring what is being send you will need to test what changes are needed stop the error response.
For that you can use Telnet command, that comes in window (But from windows7 and later you will have to activate it via control panel / add remove programs).

It's very simple to use:
Telnet 5010
Telnet www.google.com 80

And then write (even if you can see what you are writing) for example:
and press enter, and you will get the full response of the http server

Instead of a simple GET put the full http request.

José Antonio.

von Jose Antonio Garrido - am 26.10.2016 22:13
Thank you. Very helpful.

von Jim Carson - am 28.10.2016 16:06
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.