[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: HTTPAPI Timeout issue



Adding DNS to the IBMi is easy and makes this kind of work much easier - with very little risk. You don't run a DNS server directly, you just need to use one. You can do this by adding entries to CHGTCPDMN:
                       Change TCP/IP Domain (CHGTCPDMN)
                                                       
Type choices, press Enter.                             
                                                       
Domain name server:                                    
  Internet address . . . . . . .   '172.24.1.32'       
                                                       
  Internet address . . . . . . .   '172.24.1.19'

These IP addresses are the same as the DNS servers that your PC would use when on the network. So you can use IPCONFIG -all, find the DNS servers listed and then CHGTCPDMN and enter those IPs in the domain name server prompts. Eliminates the need to make host entries and allows you to access a world of internet possibilities as well as internal resources by name.

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of RPG List
Sent: Tuesday, February 24, 2015 8:13 AM
To: HTTPAPI and FTPAPI Projects
Subject: RE: HTTPAPI Timeout issue

Mike you must be the genius at finding that stuff, I looked all over for it to confirm basic authentication but I couldn't find it directly.

Ok, I ran the debug over lunch and a couple of things jumped out:

1. It says no DNS configured.  That's partially true, the Admin added an entry to the host file and I can ping the name and ip address, so that should work unless the httpapi is expecting something else.

2. at the beginning it says the following:

http_setauth(): entered
SetError() #38: HTTP Auth values cannot contain a colon!

If that's part of the issue, we have a problem, stripe expects a colon so as to not require a password for testing purposes.



> 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
> [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]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]http://www.scottklement.com/mailman/listinfo/ftpapi
>>>      >>
>>>      --------------------------------------------------------------------
>>>      ---
>>>      >>
>>>      >
>>>      >
>>>      --------------------------------------------------------------------
>>>      ---
>>>      > This is the FTPAPI mailing list.  To unsubscribe, please go to:
>>>      > [4]http://www.scottklement.com/mailman/listinfo/ftpapi
>>>      >
>>>      --------------------------------------------------------------------
>>>      ---
>>>      >
>>>      --------------------------------------------------------------------
>>>      ---
>>>      This is the FTPAPI mailing list.  To unsubscribe, please go to:
>>>      [5]http://www.scottklement.com/mailman/listinfo/ftpapi
>>>      --------------------------------------------------------------------
>>>      ---
>>>
>>>    --
>>>    R.
>>>
>>> References
>>>
>>>    1. mailto:rpglist@xxxxxxxxxxx
>>>    2. https://api.stripe.com/v1/charges
>>>    3. http://www.scottklement.com/mailman/listinfo/ftpapi
>>>    4. http://www.scottklement.com/mailman/listinfo/ftpapi
>>>    5. 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
>> ---------------------------------------------------------------------
>> -
>> -
>>
>>
>
>
> ----------------------------------------------------------------------
> - 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
> ----------------------------------------------------------------------
> -
>
>


-----------------------------------------------------------------------
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
-----------------------------------------------------------------------