Roger,
What is best method to do a download, with a get, and include headers with the proper id,etc. We have the specs for each request, but we have used
soap for most of our downloads. You probably have some examples somewhere.
Thanks
Fred
Omni
Web page downloads
Re: Web page downloads
Also, is CURL the easiest quick method? Have not ever tried it. Their examples are Curl with the entire request
Fred
Fred
Re: Web page downloads
Fred,
You said you use SOAP, but what tool do you currently use to do that?
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com
Real Business Applications Ltd
http://www.rbauk.com
Re: Web page downloads
It depends on the capabilities of the server which holds the file to download.
1. If the server supports FTP or SFTP, then that is probably the best method.
eXpress++ samples show how to do SFTP.
If the server supports a Web Server such as IIS or Apache, then you can simply download via a URL, provided that the server allows access to the files. For example, here is a URL that you can click on: http://bb.donnay-software.com/donnay/sqlquery20.zip.
If the server supports SOAP protocol and is well documented, then SOAP can also be used, but it is much more complicated.
1. If the server supports FTP or SFTP, then that is probably the best method.
eXpress++ samples show how to do SFTP.
If the server supports a Web Server such as IIS or Apache, then you can simply download via a URL, provided that the server allows access to the files. For example, here is a URL that you can click on: http://bb.donnay-software.com/donnay/sqlquery20.zip.
If the server supports SOAP protocol and is well documented, then SOAP can also be used, but it is much more complicated.
The eXpress train is coming - and it has more cars.
Re: Web page downloads
Roger,
Wished they did use soap. We use soapui, which is now part of Smartbear. This web appears to be a header and request name and they send back the
response json, which is no issue once we get it. All their examples for each request is using curl, which I downloaded 5 years ago but never used it.
Just unsure of method to send the request and header.
curl --request GET \
--url 'https://api.theirpage.com/v1/users?per_ ... &page_no=1' \
--header 'Accept: application/json' \
--header 'X-Api-Key: their_key'
That is the exact request needed. with curl. Would our GET using loadfromurl do the basic same thing?
They have about 50 different gets and posts, and if click they give the exact info needed, like above. as long as you have the key for the account (their_key_
F
Wished they did use soap. We use soapui, which is now part of Smartbear. This web appears to be a header and request name and they send back the
response json, which is no issue once we get it. All their examples for each request is using curl, which I downloaded 5 years ago but never used it.
Just unsure of method to send the request and header.
curl --request GET \
--url 'https://api.theirpage.com/v1/users?per_ ... &page_no=1' \
--header 'Accept: application/json' \
--header 'X-Api-Key: their_key'
That is the exact request needed. with curl. Would our GET using loadfromurl do the basic same thing?
They have about 50 different gets and posts, and if click they give the exact info needed, like above. as long as you have the key for the account (their_key_
F
Re: Web page downloads
The curl works fine. Just the formatting of the command is a learning curve.
Thanks
Thanks
Re: Web page downloads
Hi,
Simple as this.
Simple as this.
Code: Select all
cUrl := 'https://api.theirpage.com/v1/users?per_ ... &page_no=1'
cHeader := 'Accept: application/json' + CRLF
cHeader += 'X-Api-Key: their_key'
cResult := loadfromUrl(cUrl,,,,,"GET",,cHeader)
Re: Web page downloads
Thanks for that..could not get the headers to work until I saw your example, so do not need to use 3rd party app curl.
Fred
Fred