String asURI contentStream - troubles

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

String asURI contentStream - troubles

Petr Fischer-3
Hi,

I need to get stream from general (user entered) URI.

1) 'file:///Users/pf/Documents' asURI contentStream - this works  
(instance of StandardFileStream)

2) 'http://www.seznam.cz/' asURI contentStream - error  
(MessageNotUnderstood: HTTPClient class>>contentStreamForURI:)

I need one way (method) for all types of URIs (http, file, ftp...).

Any ideas? Thanks, pf
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: String asURI contentStream - troubles

Hexamorph
Petr Fischer wrote:

> Hi,
>
> I need to get stream from general (user entered) URI.
>
> 1) 'file:///Users/pf/Documents' asURI contentStream - this works
> (instance of StandardFileStream)
>
> 2) 'http://www.seznam.cz/' asURI contentStream - error
> (MessageNotUnderstood: HTTPClient class>>contentStreamForURI:)
>
> I need one way (method) for all types of URIs (http, file, ftp...).
>
> Any ideas? Thanks, pf

Hi!
I'm quite new to Squeak/Smalltalk (and totally fresh to this list),
so I might be wrong.

Maybe this is what you want:

'theURLString' asUrl retrieveContents contentStream

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: String asURI contentStream - troubles

Petr Fischer-3
Thanks, pf

On 24.1.2008, at 0:26, Hexamorph wrote:

> Petr Fischer wrote:
>> Hi,
>> I need to get stream from general (user entered) URI.
>> 1) 'file:///Users/pf/Documents' asURI contentStream - this works  
>> (instance of StandardFileStream)
>> 2) 'http://www.seznam.cz/' asURI contentStream - error  
>> (MessageNotUnderstood: HTTPClient class>>contentStreamForURI:)
>> I need one way (method) for all types of URIs (http, file, ftp...).
>> Any ideas? Thanks, pf
>
> Hi!
> I'm quite new to Squeak/Smalltalk (and totally fresh to this list),  
> so I might be wrong.
>
> Maybe this is what you want:
>
> 'theURLString' asUrl retrieveContents contentStream
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

smime.p7s (3K) Download Attachment