Custom headers HTTP protected site
Jim Ault
jimaultwins at yahoo.com
Fri Oct 9 19:26:39 EDT 2009
Thanks for the note. It prompted me to try a simpler solution than
trying to mimic the full browser set of headers.
I just tried adding only the following:
set the httpheaders to "Authorization: Basic
cm90b3Bhc3MyOjUzcHJpbmNlNDY="
and it worked for the web page as html.
This will get me where I need to go for the immediate future, but I
would like to figure out how to use a page link to download a text file.
In this instance,
http://www.baseballhq.com/members/tools/projections/proj.php?lg=A&p=B&t=PY&ids=1&f=csv
which normally would trigger the browser to offer the 'save as' dialog.
Perhaps using Apple/VBScript to control the browser as a workaround.
Thanks for the late-night Friday help.
Jim Ault
Las Vegas
On Oct 9, 2009, at 3:47 PM, Dave Cragg wrote:
>
> On 9 Oct 2009, at 22:14, Jim Ault wrote:
>>
>> Question What am I missing?
>> I set the libURLSetCustomHTTPHeaders == those used by the actual
>> browser but get a blank page.
>
> To set custom headers, just use the httpHeaders property.
>
> set the httpHeaders to "SomeHeader: someValue"
>
> (libURLSetCustomHTTPHeaders is really for setting the entire
> request, including the initial request line. Generally, it's not
> needed.)
>
> But if it is just the authorization header that needs to be set,
> then it should get set automatically if you include the name and
> password in the url as in your example.
>
> Dave
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
Jim Ault
jimaultwins at yahoo.com
More information about the use-livecode
mailing list