[SLVD] Prefered way to make a http request and parse xml doc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-08-30
07:55 PM
- last edited on
ā2022-12-06
02:00 PM
by
Daniel Kassai
Unfortunately there are no examples nor is it mentioned in the documentation. Is it just undocumented section or are there any examples for us to use?
Secondly, is there a preferred "AC API" way to execute a http request from a plugin? An example would be great too.
- Labels:
-
Add-On (C++)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-08-31 11:18 PM
I don't have an answer for you, I'm just joining this thread because I'd like to know how to make HTTP requests. HTTPS requests would be even better.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-09-12 02:24 PM
vuego wrote:
I've noticed that there is a XML engine included with AC Api in GSRoot module.
There is more than one XML Engine which you can use. For what purpose would you like to use it?
vuego wrote:
Secondly, is there a preferred "AC API" way to execute a http request from a plugin? An example would be great too.
You can find examples about http/https request in API DevKit's Examples/Goodie_Functions/Src/Goodie_Functions.cpp.
One of them is
Best,
MihƔly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-09-12 03:09 PM
Besides Do_DownloadWebpage, there are also Do_XML_From_String() and Do_XML_Write(), that are all I needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-09-18 11:28 AM
Response response; GS::IChannelX channel(clientConnection.BeginReceive(response), GS::GetNetworkByteOrderIProtocolX());I would like to store binary response to a file object IO::File..
IO::Location rab("C:/GDLTest/11204.gsm2"); IO::File targetFile(rab, IO::File::Create);How can I store data from GS::ChanelX into IO::File?
Or, is it possible to use IO::File as IChannel and store request directly to file using clientConnection.BeginReceive(response) ?
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-09-18 11:35 AM
vuego wrote:The 'I' in IChannel stands for input channel. You have to open an output channel (GS::OChannel), which can be an IO::File, then write the data directly into it.
I have another question. I am getting binary data with my http request into GS::IChannelX. My binary data is a gsm object.
How can I store data from GS::ChanelX into IO::File?
Or, is it possible to use IO::File as IChannel and store request directly to file using clientConnection.BeginReceive(response) ?
Thank you in advance.
Best, Akos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-09-18 12:10 PM
I am having trouble receiving/writing data from HTTP::ClientConnection directly into IO::File (GS::OChannel)... how do I achieve that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-09-18 12:56 PM
vuego wrote:Again: IChannels are for input OChannel are for output. The http connection is the input channel, and you yourself have to write that information to the output channel (== IO::File). So the pseudo code:
Sorry, I ment IO::File as output channel.
I am having trouble receiving/writing data from HTTP::ClientConnection directly into IO::File (GS::OChannel)... how do I achieve that?
read bytes from input
write bytes to output
Best, Akos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-09-18 01:09 PM
I thought there would be a more elegant way of connecting input and output channels than that
