Hey guys so I’m pulling down a yaml file from a web server. My NSInputStream works great with local yaml files (using file://filename.yaml url scheme)
Here’s the relevant code snippet:
NSInputStream * stream = [[NSInputStream alloc] initWithURL:yamlURL];
Where yaml url is something like http:// myip:8000/assets/test.yaml Opening in a browser just results in file download…
Any thoughts?
Is there anything you’re doing with the *stream, After you initWithURL?
If you are taking the content from the InputStream inited with the local file, you would need to be creating a NSOutputStream to take the InputStream and redirect it to Safari. So I don’t think just initWithURL: call with the url will tell you much, but the call to open the http:// url in safari will try to determine the content-type and try to output the file. But I don’t think safari would be able to display the contents if it was a mulit-part mime yaml file.