FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
cURL and WD21
cURL and WD21
Débuté par Jim Carson, 26 oct. 2016 15:12 - 6 réponses
Connectez-vous…
Jim Carson
#1
Posté le 26 octobre 2016 - 15:12
Has anyone used cURL with Windev to process HTTPrequest's. If so, any hints?
Signaler
0
0
Fabrice Harari
#2
Posté le 26 octobre 2016 - 15:52
Hi Jim
why would we do that? Why not use the native httprequest/httpgetresult/httpform functions?
Best regards
Signaler
0
0
Jim Carson
#3
Posté le 26 octobre 2016 - 16:28
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.
Signaler
0
0
Paulo Oliveira
#4
Posté le 26 octobre 2016 - 19:05
did you use one httpRequest/httpResponse variables and HTTPSend function?
what is in the Content,Header and Method properties?
http://doc.windev.com/en-US/…
http://doc.windev.com/en-US/…
http://doc.windev.com/en-US/…
Signaler
0
0
ANGELOREIS
#5
Membre enregistré
44 messages
Popularité : +7 (7 votes)
Posté le 26 octobre 2016 - 23:10
Hello My Friend.
check this post:
http://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/754-trabalhando-com-httprequest-com-exemplos-que-usam-curl/read.awp…
--
Analista de Sistemas Jr
www.arsistemas.com.br
Pai da Alícia e Marido da Andréa <3
Signaler
0
0
Jose Antonio Garrido
#6
Posté le 27 octobre 2016 - 00:13
Quote
Jim Carson
I can't figure out how to see all of the HTTPrequest details
Hi,
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 = "127.0.0.1:5010" //5010 is the port is the port I chosed in SocketCreate() cMyResponse is httpResponse = HTTPSend(cMyRequest)
Shows this trace window:
GET / HTTP/1.1<\ ><\ >User-Agent: PC SOFT Framework<\ ><\ >Host: 127.0.0.1:5010<\ ><\ >Accept: */*<\ ><\ ><\ ><\ >
This is the code used to create the socket:
SocketCreate("Consommation",5010,"127.0.0.1") SocketChangeTransmissionMode("Consommation",SocketNoEndTag)
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 127.0.0.1 5010
or
Telnet
www.google.com
80
And then write (even if you can see what you are writing) for example:
GET
and press enter, and you will get the full response of the http server
Instead of a simple GET put the full http request.
Regards,
José Antonio.
Signaler
0
0
Jim Carson
#7
Posté le 28 octobre 2016 - 18:06
Thank you. Very helpful.
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte