comp.lang.ada
 help / color / mirror / Atom feed
* AWS HTTPS Request
@ 2018-02-22  7:22 eduardsapotski
  2018-02-22 15:19 ` Maxim Reznik
  0 siblings, 1 reply; 2+ messages in thread
From: eduardsapotski @ 2018-02-22  7:22 UTC (permalink / raw)


------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with AWS.Client;
with AWS.Response;

procedure Main is
   resp : AWS.Response.Data;
begin
   resp := AWS.Client.Get (URL => "http://sourceforge.net/");
   Put_Line (AWS.Response.Message_Body (resp));
end Main;
------------------------------------
It works!
------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with AWS.Client;
with AWS.Response;

procedure Main is
   resp : AWS.Response.Data;
begin
   resp := AWS.Client.Get (URL => "https://sourceforge.net/");
   Put_Line (AWS.Response.Message_Body (resp));
end Main;
------------------------------------
This does not work!

raised PROGRAM_ERROR : aws-client.adb:391 finalize/adjust raised exception
[2018-02-22 10:18:01] process exited with status 1, elapsed time: 00.20s

Why?

As I understand it, need to send a certificate to the server? Where can I get it?
Thanks!


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: AWS HTTPS Request
  2018-02-22  7:22 AWS HTTPS Request eduardsapotski
@ 2018-02-22 15:19 ` Maxim Reznik
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Reznik @ 2018-02-22 15:19 UTC (permalink / raw)


You should build AWS from sources and enable explicitly enable SSL support
to be able to use https.
Prebuilded AWS included in GNAT GPL release has this feature disabled.

unpack AWS and run something like this
  make setup build install SOCKET=openssl

See documentation for more details:
http://docs.adacore.com/live/wave/aws/html/aws_ug/building_aws.html#building

Best regards,

-- 
Maxim Reznik

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-22 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22  7:22 AWS HTTPS Request eduardsapotski
2018-02-22 15:19 ` Maxim Reznik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox