[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HTTP API Get Function
Thanks Scott.
http_setauth worked for me.
On Wed, Jul 13, 2011 at 4:28 PM, Scott Klement
<[1]sk@xxxxxxxxxxxxxxxx> wrote:
Assuming you want the userid/password to be sent via HTTP basic
authentication (I'm not familiar with the --user switch in curl, I
don't
know precisely what it does.)
You have two options. First one is to do this before the GET
request:
callp http_setauth( HTTP_AUTH_BASIC: user: password );
the other is to embed it into the URL:
[2]http://user:password@xxxxxxxxxxx/blah/blah
Good luck
On 7/13/2011 2:15 PM, Narasimha Reddy wrote:
>
> Hello,
>
>
>
> Do we have any Get Function to provide authentication (user id&
> password) and get file from url ?
>
>
>
> I am trying to get a file from
> [1][3]http://acme.pagerduty.com/api/v1/incidents
>
>
>
> If I just use http_url_get function, it returns data like
"redirected
> to [2][4]http://acme.pagerduty.com ". This is the original
login page. So
> my Get function should go with User Id and password.
>
> See here the Curl example
>
>
>
> curl --basic --user "USERID:PASSWORD"
> [3][5]http://acme.pagerduty.com/api/v1/incidents
> --
> Narasimha Reddy
>
> References
>
> 1. [6]http://acme.pagerduty.com/api/v1/incidents
> 2. [7]http://acme.pagerduty.com/
> 3. [8]http://acme.pagerduty.com/api/v1/incidents
>
>
>
>
>
-------------------------------------------------------------------
----
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> [9]http://www.scottklement.com/mailman/listinfo/ftpapi
>
-------------------------------------------------------------------
----
-------------------------------------------------------------------
----
This is the FTPAPI mailing list. To unsubscribe, please go to:
[10]http://www.scottklement.com/mailman/listinfo/ftpapi
-------------------------------------------------------------------
----
--
Narasimha Reddy
References
1. mailto:sk@xxxxxxxxxxxxxxxx
2. http://user:password@xxxxxxxxxxx/blah/blah
3. http://acme.pagerduty.com/api/v1/incidents
4. http://acme.pagerduty.com/
5. http://acme.pagerduty.com/api/v1/incidents
6. http://acme.pagerduty.com/api/v1/incidents
7. http://acme.pagerduty.com/
8. http://acme.pagerduty.com/api/v1/incidents
9. http://www.scottklement.com/mailman/listinfo/ftpapi
10. 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
-----------------------------------------------------------------------