Morning
I am now trying to get HTTPRequest or HTTPForm to work but with no avail. Fabrice I have had a look at your use of HTTPRequest in replication but I am not coming right.
If anybody cares to go to [api.cyclopsit.com] you will see that there are 3 calls exposed.
1. List all the agents
2. Get specific agent details
3. Update agent details
1. If you type [api.cyclopsit.com] in a browser you will see that the details for 2 agents are returned.
In Windev I tried this:
asURL is ANSI string = "[api.CyclopsIT.com];
asHeader is ANSI string
sUsResult is UNICODE string
IF NOT HTTPRequest(asURL,"","","","text/xml","","")
Error(ErrorInfo(errFullDetails))
ELSE
asHeader = HTTPGetResult(httpHeader)
END
Info(asHeader)
All that is returned is the OK and details about the server but no details of the 2 agents.
2. If you type in [api.cyclopsit.com] in a browser you will see that the details of one agent is returned.
In Windev I tried it now as follow:
asURL is ANSI string = "[api.CyclopsIT.com];
asHeader is ANSI string
sUsResult is UNICODE string
HTTPCreateForm("Form")
HTTPAddParameter("Form","agentId","1")
HTTPAddParameter("Form","clientId","1")
IF NOT HTTPSendForm("Form",asURL,"","","","text/xml") THEN
Error(ErrorInfo(errFullDetails))
END
asHeader = HTTPGetResult(httpHeader)
HTTPCancelForm("Form")
Info(asHeader)
Once again all I get is an OK with some server details but not usable data.
Can someone please tell me what I am doing wrong.
Thanks in advance
Ericus Steyn
I am now trying to get HTTPRequest or HTTPForm to work but with no avail. Fabrice I have had a look at your use of HTTPRequest in replication but I am not coming right.
If anybody cares to go to [api.cyclopsit.com] you will see that there are 3 calls exposed.
1. List all the agents
2. Get specific agent details
3. Update agent details
1. If you type [api.cyclopsit.com] in a browser you will see that the details for 2 agents are returned.
In Windev I tried this:
asURL is ANSI string = "[api.CyclopsIT.com];
asHeader is ANSI string
sUsResult is UNICODE string
IF NOT HTTPRequest(asURL,"","","","text/xml","","")
Error(ErrorInfo(errFullDetails))
ELSE
asHeader = HTTPGetResult(httpHeader)
END
Info(asHeader)
All that is returned is the OK and details about the server but no details of the 2 agents.
2. If you type in [api.cyclopsit.com] in a browser you will see that the details of one agent is returned.
In Windev I tried it now as follow:
asURL is ANSI string = "[api.CyclopsIT.com];
asHeader is ANSI string
sUsResult is UNICODE string
HTTPCreateForm("Form")
HTTPAddParameter("Form","agentId","1")
HTTPAddParameter("Form","clientId","1")
IF NOT HTTPSendForm("Form",asURL,"","","","text/xml") THEN
Error(ErrorInfo(errFullDetails))
END
asHeader = HTTPGetResult(httpHeader)
HTTPCancelForm("Form")
Info(asHeader)
Once again all I get is an OK with some server details but not usable data.
Can someone please tell me what I am doing wrong.
Thanks in advance
Ericus Steyn