Hey!

1. Did try latest gnoga on git repo and its works perfect. Sorry for the
delayed confirmation.
2. For further references, I take this opportunity to share some infos
regarding a server connection as an https-client:

- You can find some basic flow/test code under
gnoga/deps/simple_components/test_components/test_https_client.adb

- For whaterver reasons, my GPS kept freezing to death when ever I did not
have all the file dependencies properly added to my project; file being
test_https_client.adb. e.g: with GNUTLS; and any code trying to reference
it would just freeze GPS for eternity. One thing that worked was to disable
Smart Completion in the GPS preferences.

- I am using this https-client connection to order mails at mailgun.
Mailgun has good example code to properly make use of their REST api for
sending emails. One thing that made me struggled a lot was to properly add
my credentials in the https request header. I had to trace with curl to
find what was expected from mail gun. Here I explain the catch: (You should
understand if ever you have to use their api)

Mailgun gives you a secret api key that you have to set in the header of
your https POST request. In all their example, they use mainstream
languages OO facilities to set the authentication parameter of an http
request e.g in Python:

def send_simple_message():
    return requests.post(
        "https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages";,
        auth=("api", "YOUR_API_KEY"),
        data={"from": "Excited User <mailgun@YOUR_DOMAIN_NAME>",
              "to": ["b...@example.com", "YOU@YOUR_DOMAIN_NAME"],
              "subject": "Hello",
              "text": "Testing some Mailgun awesomness!"})

I did not find such utility in gnoga or the simple components api. I
managed to build it myself and it does the trick. Here is the code snippet:

...
    Client : HTTP_Session_Signaled renames HTTP_Session_Signaled (Ptr
(Reference).all);
begin
    Connect (Client, "api.mailgun.net", 443);

    Client.Set_Request_Header (Header => Authorization_Header,
                                              Value  => "Basic " &
To_Base64("api:key-blablabla...blabla"));
...

Hope it can help someone some day.

Ciao :)

ohenley

ps: Congrats David for the all the new joyful family events. If I may...
Mazel Tov!

On Sat, Nov 21, 2015 at 9:07 PM, Rabbi David Botton <da...@botton.com>
wrote:

> You could file a bug on sourceforge. For some reason the virtual machine
> hosting gnoga (and many other sites) has been crashing since I updated the
> host Mac OS X to El Capitan. I did so only after a month of testing so I am
> surprised. If keeps happening I'll move to a different host on my network.
>
> Do you have the same issue when use the version of Gnonga from Git?
>
>
> David Botton
> On Sat, Nov 21, 2015 at 4:51 PM Olivier Henley <olivier.hen...@gmail.com>
> wrote:
>
>> hey!
>>
>> 1. Something is wrong with gnoga-1.1a. Compiles, server starts but both
>> Chrome and Firefox returns "the connection was reset". Connecting at
>> 127.0.0.1:8080, no zombie process on my side. Uninstalled 1.1a,
>> installed 1.1 and things run smoothly again.
>> 2. gnoga site is down since this morning
>>
>> Olivier
>>
>> p.s: question: why gnoga is not on github or bitbucket? Maybe I already
>> asked but I could have filled an issue instead of writing a mail.
>> Github/bitbucket are more powerful dev repos in general... arent they?
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Gnoga-list mailing list
>> Gnoga-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>>
>
------------------------------------------------------------------------------
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to