I am trying to turn an HTTP component into an HTTPS component to connect to Amazon. I am using D7. Here is what I have so far with an Indy 9 HTTP client component named HTTPS:
var Authorization, Response, Headers: string;
begin
Authorization := MimeEncodeString('myusername:mypassword');
HTTPS.Request.URL := '
Headers := 'Authorization: Basic ' + Authorization +
' Content-Type: text/xml ' + Cookie.Text; // Cookie is a predefined string
HTTPS.Post(URL.Text, Headers, Response);
D7 complains that there is no overloaded version of POST that can be called with those parameters even though D7 performs a code completion with the overloaded version above.
I do have libeay32.dll and ssleay32.dll in my development directory.
I also have a TIdSSLIOHandlerSocket named IdSSLIOHandlerSocket1 and the following lines do compile if I insert them:
HTTPS.IOHandler := IdSSLIOHandlerSocket1;
IdSSLIOHandlerSocket1(HTTPS.IOHandler).SSLOptions.Method := sslvSSLv3;
What I am trying to accomplish is send the Authorization, Content-Type, and Cookie as "Headers" in an HTTPS connection to the Amazon URL.
Thanks for any help you can provide.
var Authorization, Response, Headers: string;
begin
Authorization := MimeEncodeString('myusername:mypassword');
HTTPS.Request.URL := '
Headers := 'Authorization: Basic ' + Authorization +
' Content-Type: text/xml ' + Cookie.Text; // Cookie is a predefined string
HTTPS.Post(URL.Text, Headers, Response);
D7 complains that there is no overloaded version of POST that can be called with those parameters even though D7 performs a code completion with the overloaded version above.
I do have libeay32.dll and ssleay32.dll in my development directory.
I also have a TIdSSLIOHandlerSocket named IdSSLIOHandlerSocket1 and the following lines do compile if I insert them:
HTTPS.IOHandler := IdSSLIOHandlerSocket1;
IdSSLIOHandlerSocket1(HTTPS.IOHandler).SSLOptions.Method := sslvSSLv3;
What I am trying to accomplish is send the Authorization, Content-Type, and Cookie as "Headers" in an HTTPS connection to the Amazon URL.
Thanks for any help you can provide.