[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: HTTPAPI Timeout issue
Yes, I'm configured and connected. If I just do a ping to api.stripe.com
it works perfectly.
but when I call the http_url_post I get a -1
> I tried your code and it is working fine here....
> here are the first lines of the received file...
> "object": "list",
> "has_more": true,
> "url": "/v1/charges",
> "data": [
> {
> "id": "ch_15hlVD2eZvKYlo2C7P0ApOUm",
> "object": "charge",
> "created": 1426701767,
> how are you configured and connected to the internet ... firewall,
> proxy, dns ,...
> can you resolve the name ? just ping api.stripe.com from your IBM i ?
> Paul
> From: "RPG List" <rpglist@xxxxxxxxxxx>
> To: "HTTPAPI and FTPAPI Projects"
> <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> Date: 18/03/2015 18:46
> Subject: RE: HTTPAPI Timeout issue
> Sent by: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> __________________________________________________________________
>
> I was but its not writing anything.
> > are you looking for debug information in /tmp/httpapi_debug.txt
> ?
> >
> > Paul
> > From: "RPG List" <rpglist@xxxxxxxxxxx>
> > To: "HTTPAPI and FTPAPI Projects"
> > <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> > Date: 18/03/2015 18:14
> > Subject: RE: HTTPAPI Timeout issue
> > Sent by: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> >
> __________________________________________________________________
> >
> > I'm thinking that the issue here may be that the first call
> > http_setauth does in deed complete successfully, and stripe is
> > returning a
> > valid response, but on the second call its expecting another set
> of
> > credentials which it doesn't receive and therefore fails.
> > One thing they mention in their documentation, each api request
> must be
> > authenticated, but I'm not sure who to pass additional parms with
> the
> > authentication call, if that is even possible.
> > > I was able to finally get back to this. Two things:
> > >
> > > 1. rc is still returning a -1
> > > 2. http_debug never writes to the temp file.
> > >
> > > So I'm not sure where to go from here.
> > >
> > > Dutch
> > >
> > >
> > >> Here is short HTTPAPI driven test (no error checking but you
> will
> > add
> > >> that):
> > >>
> > >> H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('HTTPAPI')
> > >> D/copy qrpglesrc,httpapi_h
> > >> D cmd pr extpgm('QCMDEXC')
> > >> D command 200A const
> > >> D length 15P 5 const
> > >> D rc S 10I 0
> > >> D err S 10I 0
> > >> D userid S 50A
> > >> D pass S 50A
> > >> D URL s 256A
> > >>
> > >> *inlr = *on ;
> > >> http_debug(*on);
> > >>
> > >> userid = 'sk_test_BQokikJOvBiI2HlWgH4olfQ2';
> > >> pass = '';
> > >> URL = 'https://api.stripe.com/v1/charges';
> > >>
> > >> rc = http_setauth(HTTP_AUTH_BASIC : userid : pass);
> > >> rc = http_url_get(URL : '/tmp/rpglist.html');
> > >>
> > >> cmd('DSPF ''/tmp/rpglist.html''': 200);
> > >>
> > >>
> > >>
> > >>
> > >> -----Original Message-----
> > >> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> > >> [[1][1]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf
> Of Mike
> > Krebs
> > >> Sent: Tuesday, February 24, 2015 1:58 PM
> > >> To: HTTPAPI and FTPAPI Projects
> > >> Subject: RE: HTTPAPI Timeout issue
> > >>
> > >> On the stripe.com site, it indicates that basic authentication
> is
> > used.
> > >> And that fits with the example curl you provided.
> > >>
> > >>
> > >>
> > >> -----Original Message-----
> > >> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> > >> [[2][2]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf
> Of RPG
> > List
> > >> Sent: Tuesday, February 24, 2015 7:42 AM
> > >> To: HTTPAPI and FTPAPI Projects
> > >> Subject: Re: HTTPAPI Timeout issue
> > >>
> > >> One additional point, I still believe that they are expecting
> the
> > user
> > >> name to be passed as a parm, now how that should be
> constructed, I'm
> > >> trying to find out....
> > >>
> > >> I don't believe they are using http authentication itself...
> > >>
> > >> Dutch
> > >>
> > >>
> > >>> I will when I get a free moment to jump back on that project,
> but
> > it
> > >>> will be tonight at the latest.
> > >>>
> > >>> Thanks for the reply,
> > >>>
> > >>> Dutch
> > >>>
> > >>>
> > >>>> Hi Dutch,
> > >>>> can you please put a http_debug in here?
> > >>>> Thx,
> > >>>> RaduÂ
> > >>>>
> > >>>> On Mon, Feb 23, 2015 at 11:19 AM, RPG List
> > <[1]rpglist@xxxxxxxxxxx>
> > >>>> wrote:
> > >>>>
> > >>>> Scott,
> > >>>> I tried that, but I'm still getting a timeout. I
> believe
> > that
> > >>>> they
> > >>>> are
> > >>>> expecting the username to be passed as a parameter not
> as
> > >>>> basic_auth
> > >>>> > Dutch,
> > >>>> >
> > >>>> > User/Password in HTTPAPI are set by calling the
> > http_setAuth()
> > >>>> > routine.  Assuming you want Basic authentication
> (which
> > is
> > >>>> the
> > >>>> default
> > >>>> > in web browsers) you'd do it like this:
> > >>>> >
> > >>>> >    c          callp  Â
> > >>>> http_setAuth(
> > >>>> HTTP_AUTH_BASIC
> > >>>> >    c              Â
> :
> > >>>> 'sk_test_BQokikJOvBiI2HlWgH4olfQ2'
> > >>>> >    c              Â
> : ''
> > );
> > >>>> >Â Â Â Â c
> > >>>> >    c          eval  Â
> rc =
> > >>>> http_url_post(
> > >>>> >Â Â Â Â c
> '[2][3][3]https://api.stripe.com/v1/charges'
> > >>>> >    c              Â
> :
> > >>>> myPointer
> > >>>> >    c              Â
> :
> > >>>> dataSize
> > >>>> >    c              Â
> :
> > >>>> '/tmp/testpost.html'
> > >>>> >    c              Â
> :
> > >>>> HTTP_TIMEOUT
> > >>>> >    c              Â
> :
> > >>>> HTTP_USERAGENT
> > >>>> >    c              Â
> :
> > >>>> 'application/x-www-form-urlencoded'
> > >>>> > )
> > >>>> >
> > >>>> >
> > >>>> > On 2/22/2015 7:04 AM, RPG List wrote:
> > >>>> >> Scott,
> > >>>> >> I am attempting to send a login credential, no
> password,
> > just
> > >>>> the
> > >>>> login.
> > >>>> >>
> > >>>> >> It must be sent via https and with
> > >>>> application/x-www-form-urlencoded, I
> > >>>> >> thought I could use the curl example but I see that
> was
> > wrong.
> > >>>> >>
> > >>>> >>
> > >>>> >>
> > >>>> >>
> > >>>>
> >
> --------------------------------------------------------------------
> > >>>> ---
> > >>>> >> This is the FTPAPI mailing list. To unsubscribe,
> please
> > go
> > >>>> to:
> > >>>> >>
> [3][4][4]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>>> >>
> > >>>>
> >
> --------------------------------------------------------------------
> > >>>> ---
> > >>>> >>
> > >>>> >
> > >>>> >
> > >>>>
> >
> --------------------------------------------------------------------
> > >>>> ---
> > >>>> > This is the FTPAPI mailing list. To unsubscribe,
> please
> > go
> > >>>> to:
> > >>>> >
> [4][5][5]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>>> >
> > >>>>
> >
> --------------------------------------------------------------------
> > >>>> ---
> > >>>> >
> > >>>>
> >
> --------------------------------------------------------------------
> > >>>> ---
> > >>>> This is the FTPAPI mailing list. To unsubscribe,
> please go
> > to:
> > >>>>
> [5][6][6]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>>>
> >
> --------------------------------------------------------------------
> > >>>> ---
> > >>>>
> > >>>> --
> > >>>> R.
> > >>>>
> > >>>> References
> > >>>>
> > >>>> 1. [7][7]mailto:rpglist@xxxxxxxxxxx
> > >>>> 2. [8][8]https://api.stripe.com/v1/charges
> > >>>> 3.
> [9][9]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>>> 4.
> [10][10]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>>> 5.
> [11][11]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>>>
> >
> ---------------------------------------------------------------------
> > >>>> -- This is the FTPAPI mailing list. To unsubscribe, please
> go to:
> > >>>> [12][12]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>>>
> >
> ---------------------------------------------------------------------
> > >>>> --
> > >>>>
> > >>>
> > >>>
> > >>>
> >
> ----------------------------------------------------------------------
> > >>> - This is the FTPAPI mailing list. To unsubscribe, please go
> to:
> > >>> [13][13]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>>
> >
> ----------------------------------------------------------------------
> > >>> -
> > >>>
> > >>>
> > >>
> > >>
> > >>
> >
> -----------------------------------------------------------------------
> > >> This is the FTPAPI mailing list. To unsubscribe, please go to:
> > >> [14][14]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>
> >
> -----------------------------------------------------------------------
> > >>
> >
> -----------------------------------------------------------------------
> > >> This is the FTPAPI mailing list. To unsubscribe, please go to:
> > >> [15][15]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>
> >
> -----------------------------------------------------------------------
> > >>
> >
> -----------------------------------------------------------------------
> > >> This is the FTPAPI mailing list. To unsubscribe, please go to:
> > >> [16][16]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >>
> >
> -----------------------------------------------------------------------
> > >>
> > >>
> > >
> > >
> > >
> >
> -----------------------------------------------------------------------
> > > This is the FTPAPI mailing list. To unsubscribe, please go to:
> > > [17][17]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >
> >
> -----------------------------------------------------------------------
> > >
> > >
> >
> -----------------------------------------------------------------------
> > This is the FTPAPI mailing list. To unsubscribe, please go to:
> > [18][18]http://www.scottklement.com/mailman/listinfo/ftpapi
> >
> -----------------------------------------------------------------------
> >
> > References
> >
> > 1. [19]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> > 2. [20]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> > 3. [21]https://api.stripe.com/v1/charges'
> > 4. [22]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 5. [23]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 6. [24]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 7. [25]mailto:rpglist@xxxxxxxxxxx
> > 8. [26]https://api.stripe.com/v1/charges
> > 9. [27]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 10. [28]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 11. [29]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 12. [30]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 13. [31]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 14. [32]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 15. [33]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 16. [34]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 17. [35]http://www.scottklement.com/mailman/listinfo/ftpapi
> > 18. [36]http://www.scottklement.com/mailman/listinfo/ftpapi
> >
> -----------------------------------------------------------------------
> > This is the FTPAPI mailing list. To unsubscribe, please go to:
> > [37]http://www.scottklement.com/mailman/listinfo/ftpapi
> >
> -----------------------------------------------------------------------
> >
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> [38]http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
> References
>
> 1. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> 2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> 3. https://api.stripe.com/v1/charges'
> 4. http://www.scottklement.com/mailman/listinfo/ftpapi
> 5. http://www.scottklement.com/mailman/listinfo/ftpapi
> 6. http://www.scottklement.com/mailman/listinfo/ftpapi
> 7. mailto:rpglist@xxxxxxxxxxx
> 8. https://api.stripe.com/v1/charges
> 9. http://www.scottklement.com/mailman/listinfo/ftpapi
> 10. http://www.scottklement.com/mailman/listinfo/ftpapi
> 11. http://www.scottklement.com/mailman/listinfo/ftpapi
> 12. http://www.scottklement.com/mailman/listinfo/ftpapi
> 13. http://www.scottklement.com/mailman/listinfo/ftpapi
> 14. http://www.scottklement.com/mailman/listinfo/ftpapi
> 15. http://www.scottklement.com/mailman/listinfo/ftpapi
> 16. http://www.scottklement.com/mailman/listinfo/ftpapi
> 17. http://www.scottklement.com/mailman/listinfo/ftpapi
> 18. http://www.scottklement.com/mailman/listinfo/ftpapi
> 19. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> 20. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> 21. https://api.stripe.com/v1/charges'
> 22. http://www.scottklement.com/mailman/listinfo/ftpapi
> 23. http://www.scottklement.com/mailman/listinfo/ftpapi
> 24. http://www.scottklement.com/mailman/listinfo/ftpapi
> 25. mailto:rpglist@xxxxxxxxxxx
> 26. https://api.stripe.com/v1/charges
> 27. http://www.scottklement.com/mailman/listinfo/ftpapi
> 28. http://www.scottklement.com/mailman/listinfo/ftpapi
> 29. http://www.scottklement.com/mailman/listinfo/ftpapi
> 30. http://www.scottklement.com/mailman/listinfo/ftpapi
> 31. http://www.scottklement.com/mailman/listinfo/ftpapi
> 32. http://www.scottklement.com/mailman/listinfo/ftpapi
> 33. http://www.scottklement.com/mailman/listinfo/ftpapi
> 34. http://www.scottklement.com/mailman/listinfo/ftpapi
> 35. http://www.scottklement.com/mailman/listinfo/ftpapi
> 36. http://www.scottklement.com/mailman/listinfo/ftpapi
> 37. http://www.scottklement.com/mailman/listinfo/ftpapi
> 38. http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------