I'm trying to use telnet to access http://stream.twitter.com/1/statuses/sample.json but when I connect to it I get a 401 Unauthorized error. Being able to specify username and password would allow me to get in. When doing this in a browser, I get a popup asking for it, is there a way to do the same through telnet?
|
feedback
|
|
If you want to use Telnet as an HTTP client, you have to speak fluent HTTP. In particular, if the website requires basic authentication, you'll have to send the authentication credentials in the header with your request. It's probably best to prepare all the header lines in a separate file (e.g. Notepad) and then quickly copy/paste them into the Telnet session. Alternatively, just use a ready-made HTTP client like wget or curl! | |||
|
feedback
|
|
You can do Basic authentication with just a Base64 encoder program. (Of course, However, Twitter doesn't support Basic anymore. The only available method is OAuth, which is far too complex to use manually. There are tools such as Twurl for accessing Twitter APIs. | |||
|
feedback
|