264 posts
Location
Where you aren't
Posted 10 January 2013 - 11:56 AM
Short suggestion here. Why not make the User-Agent string with the HTTP API something like "ComputerCraft v1.4, Java 1.6"?
It would be nice to distinguish between ComputerCraft and other unlabeled Java things.
475 posts
Posted 10 January 2013 - 12:21 PM
This would be nice, so maybe a custom site for CC only? Idk just random ideas xD
280 posts
Location
Earth
Posted 10 January 2013 - 04:04 PM
Really this may only come in handy if a computercraft or minecraft related site wanted to be computercraft compatible.
180 posts
Posted 10 January 2013 - 05:09 PM
It would be handy to access websites that actively block "web bots", which such sites assume the "Java" useragent must be.
You can't even do a Google search currently because of the user agent.
Also while adding in the ability to set headers, aka user-agent, that would also provide the ability to set another header, "cookie". Accepting and replying with cookies would be exceptionally helpful, pretty much for any site that requires sign-in.
I made the same request a few months back, and seemed to have a lot of support in the community for the feature.
The good news is it wasn't rejected by those in charge - always a good sign :}
The sorta-bad news is that there hasn't been any other pressing reason to redesign the http code, which unfortunately is a lot to ask for without additional reasons to make the whole thing worth while.
510 posts
Posted 12 January 2013 - 07:10 PM
Why not just allow the User to specify a custom Header table?
7508 posts
Location
Australia
Posted 12 January 2013 - 07:19 PM
Why not just allow the User to specify a custom Header table?
This would be EXTREMELY handy! I could continue development on my projects "Google for CC" and "Git Utils"…
510 posts
Posted 13 January 2013 - 02:06 AM
Well, using an additional table for Header fields would be easy enough, but unfortunately you can't pass a table as argument to an API function…
88 posts
Location
UK
Posted 13 January 2013 - 03:59 AM
Well, using an additional table for Header fields would be easy enough, but unfortunately you can't pass a table as argument to an API function…
What? Why not? Is that a restriction of LuaJ, or just the way ComputerCraft expects you to expose APIs?
2447 posts
Posted 13 January 2013 - 04:13 AM
It's our restriction. May change, may not.