You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by Alex Harui <ah...@adobe.com> on 2018/09/26 15:07:59 UTC

Re: HTTPService and Stripe API

Hi Ramazan,

Are you using Royale or Flex?  If Flex, please re-send your question on the users@flex.apache.org<ma...@flex.apache.org> mailing list.

Either way, also provide the exact error you are getting.

Thanks,
-Alex

From: Ramazan Ergüder Bekrek <e....@yandex.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, September 26, 2018 at 2:25 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: HTTPService and Stripe API

Hi guys I was wondering if it is possible to use the HTTPService with custom Authentication: Basic header.
I tried to implement the Strip API with normal Adobe AIR and URLLoader with URLRequest but somehow
the calls to the https://api.stripe.com/v1/charges<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.stripe.com%2Fv1%2Fcharges&data=02%7C01%7Caharui%40adobe.com%7Cf2d20bf84887498c6b7908d62391fab4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636735507221262777&sdata=P9LIL33w5a3xrODZnIOOwlRA1JpZQen9yR1I2%2BuqsSY%3D&reserved=0> returns Stream error all the time.

I don't know why this happened and I would like to go forward with the implementation.
I thought that the new HTTPService would work inside of AIR.

Thanx for your feedback

Gügü

Re: HTTPService and Stripe API

Posted by Serkan Taş <se...@likyateknoloji.com>.
Hi,

My flex application uses BasicAuth with HTTPservice and HTTPServiceWrapper.

Here is my code snippet  for HTTPservice :

service:HTTPService // is ready prior to call

var encoder:Base64Encoder = new Base64Encoder();

encoder.encodeUTFBytes(username + ":" + password); // you may just use 
encodeBytes

service.headers = {Authorization:"Basic " + encoder.toString()};

service.send();

27.09.2018 16:39 tarihinde Carlos Rovira yazdı:
> Hi,
>
> I never used basic header authentication, so I searched a bit and saw 
> that seems to be based on adding custom headers and, FWICS encode in 
> base64. If that's all the needed pieces, correct me If I'm missing 
> something, I think we have all what you need. You can add headers with 
> HTTPHeader to HTTPService and we have Base64 class to encode/decode to 
> base64 (or if you don't need IE11, you can use native js methods 
> here). Let me know if there's something more involved that I'm not 
> taking into account.
> thanks
>
> Carlos
>
>
>
>
> El mié., 26 sept. 2018 a las 18:12, Alex Harui (<aharui@adobe.com 
> <ma...@adobe.com>>) escribió:
>
>     Hi Ramazan,
>
>     If you want to use Royale, do you plan to use Cordova to run the
>     application, or a browser?
>
>     It might be best to set up a simple test case with Royale, open a
>     GitHub issue, attach the test case, and we can try to help you get
>     it working.
>
>     HTH,
>
>     -Alex
>
>     *From: *Ramazan Ergüder Bekrek <e.bekrek@yandex.com
>     <ma...@yandex.com>>
>     *Reply-To: *"users@royale.apache.org
>     <ma...@royale.apache.org>" <users@royale.apache.org
>     <ma...@royale.apache.org>>
>     *Date: *Wednesday, September 26, 2018 at 8:22 AM
>     *To: *"users@royale.apache.org <ma...@royale.apache.org>"
>     <users@royale.apache.org <ma...@royale.apache.org>>
>     *Subject: *Re: HTTPService and Stripe API
>
>     I'm using Apache Flex 4.16.1 but it doesn't work.
>
>     I would like to use the Apache Royale HTTPService.
>
>     26.09.2018, 17:08, "Alex Harui" <aharui@adobe.com
>     <ma...@adobe.com>>:
>
>         Hi Ramazan,
>
>         Are you using Royale or Flex?  If Flex, please re-send your
>         question on the users@flex.apache.org
>         <ma...@flex.apache.org> mailing list.
>
>         Either way, also provide the exact error you are getting.
>
>         Thanks,
>
>         -Alex
>
>         *From: *Ramazan Ergüder Bekrek <e.bekrek@yandex.com
>         <ma...@yandex.com>>
>         *Reply-To: *"users@royale.apache.org
>         <ma...@royale.apache.org>" <users@royale.apache.org
>         <ma...@royale.apache.org>>
>         *Date: *Wednesday, September 26, 2018 at 2:25 AM
>         *To: *"users@royale.apache.org
>         <ma...@royale.apache.org>" <users@royale.apache.org
>         <ma...@royale.apache.org>>
>         *Subject: *HTTPService and Stripe API
>
>         Hi guys I was wondering if it is possible to use the
>         HTTPService with custom Authentication: Basic header.
>
>         I tried to implement the Strip API with normal Adobe AIR and
>         URLLoader with URLRequest but somehow
>
>         the calls to the https://api.stripe.com/v1/charges
>         <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.stripe.com%2Fv1%2Fcharges&data=02%7C01%7Caharui%40adobe.com%7C148d1c9c40d7488c5fae08d623c3df19%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636735721498787160&sdata=vtBukCxpPK1F7GE%2BX166SoOPxU0B57tAT5r%2Fx9Xb3gw%3D&reserved=0> returns
>         Stream error all the time.
>
>         I don't know why this happened and I would like to go forward
>         with the implementation.
>
>         I thought that the new HTTPService would work inside of AIR.
>
>         Thanx for your feedback
>
>         Gügü
>
>
>
> -- 
> Carlos Rovira
> http://about.me/carlosrovira
>

Re: HTTPService and Stripe API

Posted by Carlos Rovira <ca...@apache.org>.
Hi,

I never used basic header authentication, so I searched a bit and saw that
seems to be based on adding custom headers and, FWICS encode in base64. If
that's all the needed pieces, correct me If I'm missing something, I think
we have all what you need. You can add headers with HTTPHeader to
HTTPService and we have Base64 class to encode/decode to base64 (or if you
don't need IE11, you can use native js methods here). Let me know if
there's something more involved that I'm not taking into account.
thanks

Carlos




El mié., 26 sept. 2018 a las 18:12, Alex Harui (<ah...@adobe.com>)
escribió:

> Hi Ramazan,
>
>
>
> If you want to use Royale, do you plan to use Cordova to run the
> application, or a browser?
>
>
>
> It might be best to set up a simple test case with Royale, open a GitHub
> issue, attach the test case, and we can try to help you get it working.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Ramazan Ergüder Bekrek <e....@yandex.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, September 26, 2018 at 8:22 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: HTTPService and Stripe API
>
>
>
> I'm using Apache Flex 4.16.1 but it doesn't work.
>
> I would like to use the Apache Royale HTTPService.
>
>
>
> 26.09.2018, 17:08, "Alex Harui" <ah...@adobe.com>:
>
> Hi Ramazan,
>
>
>
> Are you using Royale or Flex?  If Flex, please re-send your question on
> the users@flex.apache.org mailing list.
>
>
>
> Either way, also provide the exact error you are getting.
>
>
>
> Thanks,
>
> -Alex
>
>
>
> *From: *Ramazan Ergüder Bekrek <e....@yandex.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, September 26, 2018 at 2:25 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *HTTPService and Stripe API
>
>
>
> Hi guys I was wondering if it is possible to use the HTTPService with
> custom Authentication: Basic header.
>
> I tried to implement the Strip API with normal Adobe AIR and URLLoader
> with URLRequest but somehow
>
> the calls to the https://api.stripe.com/v1/charges
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.stripe.com%2Fv1%2Fcharges&data=02%7C01%7Caharui%40adobe.com%7C148d1c9c40d7488c5fae08d623c3df19%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636735721498787160&sdata=vtBukCxpPK1F7GE%2BX166SoOPxU0B57tAT5r%2Fx9Xb3gw%3D&reserved=0> returns
> Stream error all the time.
>
>
>
> I don't know why this happened and I would like to go forward with the
> implementation.
>
> I thought that the new HTTPService would work inside of AIR.
>
>
>
> Thanx for your feedback
>
>
>
> Gügü
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: HTTPService and Stripe API

Posted by Alex Harui <ah...@adobe.com>.
Hi Ramazan,

If you want to use Royale, do you plan to use Cordova to run the application, or a browser?

It might be best to set up a simple test case with Royale, open a GitHub issue, attach the test case, and we can try to help you get it working.

HTH,
-Alex

From: Ramazan Ergüder Bekrek <e....@yandex.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, September 26, 2018 at 8:22 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: HTTPService and Stripe API

I'm using Apache Flex 4.16.1 but it doesn't work.
I would like to use the Apache Royale HTTPService.

26.09.2018, 17:08, "Alex Harui" <ah...@adobe.com>:

Hi Ramazan,



Are you using Royale or Flex?  If Flex, please re-send your question on the users@flex.apache.org<ma...@flex.apache.org> mailing list.



Either way, also provide the exact error you are getting.



Thanks,

-Alex



From: Ramazan Ergüder Bekrek <e....@yandex.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, September 26, 2018 at 2:25 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: HTTPService and Stripe API



Hi guys I was wondering if it is possible to use the HTTPService with custom Authentication: Basic header.

I tried to implement the Strip API with normal Adobe AIR and URLLoader with URLRequest but somehow

the calls to the https://api.stripe.com/v1/charges<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.stripe.com%2Fv1%2Fcharges&data=02%7C01%7Caharui%40adobe.com%7C148d1c9c40d7488c5fae08d623c3df19%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636735721498787160&sdata=vtBukCxpPK1F7GE%2BX166SoOPxU0B57tAT5r%2Fx9Xb3gw%3D&reserved=0> returns Stream error all the time.



I don't know why this happened and I would like to go forward with the implementation.

I thought that the new HTTPService would work inside of AIR.



Thanx for your feedback



Gügü