[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HTTP API Get Function
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:
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]http://acme.pagerduty.com/api/v1/incidents
>
>
>
> If I just use http_url_get function, it returns data like "redirected
> to [2]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]http://acme.pagerduty.com/api/v1/incidents
> --
> Narasimha Reddy
>
> References
>
> 1. http://acme.pagerduty.com/api/v1/incidents
> 2. http://acme.pagerduty.com/
> 3. http://acme.pagerduty.com/api/v1/incidents
>
>
>
>
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------