RTC Forums
November 24, 2024, 02:43:51 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Encoded message to a non-RTC HTTPS Server
Pages: [
1
]
« previous
next »
Print
Author
Topic: Encoded message to a non-RTC HTTPS Server (Read 5645 times)
zsleo
RTC Expired
Posts: 80
Encoded message to a non-RTC HTTPS Server
«
on:
January 26, 2013, 02:21:15 AM »
I want to send a URL Encoded message to a non-RTC HTTPS Server and wait for a response.
Any examples?
TIA
Zane
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Encoded message to a non-RTC HTTPS Server
«
Reply #1 on:
January 26, 2013, 02:37:21 AM »
In addition to using the URL_Encode function to encode the String before you assign it to Request.FileName property when preparing your request using the TRtcDataRequest component (as shown in Quick Start Client examples for downloading files), you will probably need to set the Request.Host property to the domain name which you want to send the request to. If that doesn't do the trick, then I will need more details about what the Server is expecting to receive.
Best Regards,
Danijel Tkalcec
Logged
zsleo
RTC Expired
Posts: 80
Re: Encoded message to a non-RTC HTTPS Server
«
Reply #2 on:
January 26, 2013, 07:24:28 AM »
Thanks Danijel.
Turns out that (D XE) "allowed" me to have the same component name for TRTCHTTPClient and TRTCDataRequest...
Regards
Zane
Logged
zsleo
RTC Expired
Posts: 80
Re: Encoded message to a non-RTC HTTPS Server
«
Reply #3 on:
January 28, 2013, 08:40:07 AM »
Danijel,
... a follow up query.
After URL_Encode the TRtcDataRequest.Request.Query.Text I am getting failed responses because the recipient is expecting a more extensive encoding. e.g "_" (underscore) == "%5F", ":" == %3A, "/"==%2F and others.
Do you know of an extended URL Encoding parser?
TIA
Zane
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Encoded message to a non-RTC HTTPS Server
«
Reply #4 on:
January 28, 2013, 09:00:28 AM »
You mean the Server is unable to handle some special characters and needs them to be encoded as well?
If that is the case, then I suggest making your own copy of the URL_Encode function (you will find it in the rtcInfo.pas unit) and writing your own version of it (for example, call it "SpecialURLEncode" and place it in your unit), so you can add encoding for characters which the Server can't handle in plain text.
The function is not complex and should be fairly easy to extend.
Best Regards,
Danijel Tkalcec
Logged
zsleo
RTC Expired
Posts: 80
Re: Encoded message to a non-RTC HTTPS Server
«
Reply #5 on:
January 28, 2013, 09:31:29 AM »
... though that may be your answer.
Thanks
Zane
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...