←  Tutorials

ComputerCraft | Programmable Computers for Minecraft

»

How to enable the HTTP API

oeed's Photo oeed 16 Mar 2014

This tutorial does not apply to ComputerCraft 1.63. Read this post as to how to fix it on there.

I soon intend to release OneOS on the FTB, Tekkit, etc forums and as the only way to install it is via HTTP I tried to find a tutorial that explains how to enable it. However, the only things I found were single posts that very briefly said to open the cfg file, so I've decided to make a tutorial on it for both Windows and Mac as well as client and servers.

To find the apporopirate tutorial, open the Windows or Mac spoiler then open either the client or server spoiler within.

If you want to enable HTTP on a server that you don't run you'll have to talk to an admin, giving them the link to this page.

Mac

Windows

If you're on Linux, I'm sure you can figure out how to get it working as you're able to use Linux, use the guides above as a rough guide.
Edited by oeed, 04 July 2014 - 05:22 AM.
Quote

CometWolf's Photo CometWolf 16 Mar 2014

Quote

I soon intend to release OneOS to on the FTP
That cracked me up more than it should have, even though i knew what you were supposed to write.

http is enabled by default i believe, meaning if it's disabled, whoever did it should know how to turn it back on :P
Quote

oeed's Photo oeed 16 Mar 2014

View PostCometWolf, on 16 March 2014 - 10:46 AM, said:

Quote

I soon intend to release OneOS to on the FTP
That cracked me up more than it should have, even though i knew what you were supposed to write.

http is enabled by default i believe, meaning if it's disabled, whoever did it should know how to turn it back on :P

Damn it! Typo fixed.
In vanilla CC isn't not on by default, as of 1.58 at least. Some mod packs will have it on though.
Quote

adencraft2000's Photo adencraft2000 17 Mar 2014

Spoiler

Question, On the mac examples I saw one of the ".DS_Store" files, These (as you may know) are hidden files and not normally visible without some trickery. What trickery did you use to make it show hidden thingies?
Edited by adencraft2000, 17 March 2014 - 09:13 PM.
Quote

oeed's Photo oeed 17 Mar 2014

View Postadencraft2000, on 17 March 2014 - 09:12 PM, said:

Spoiler

Question, On the mac examples I saw one of the ".DS_Store" files, These (as you may know) are hidden files and not normally visible without some trickery. What trickery did you use to make it show hidden thingies?

Simply Googled it.
http://ianlunn.co.uk...os-x-mavericks/
Quote

awsmazinggenius's Photo awsmazinggenius 18 Mar 2014

Nice tutorial, but if you plan on releasing it to the FTB or Tekkit launchers you should point them to the appropriate directories (make more sections). Also, I know that at least in some FTB packs HTTP comes enabled already. Tell them to type "http" in their Lua prompt to check if the table exists. Also, I find it weird how in the Windows tutorial the windows have different colors for the window border throughout the tutorial
Quote

oeed's Photo oeed 18 Mar 2014

View Postawsmazinggenius, on 18 March 2014 - 05:59 AM, said:

Nice tutorial, but if you plan on releasing it to the FTB or Tekkit launchers you should point them to the appropriate directories (make more sections). Also, I know that at least in some FTB packs HTTP comes enabled already. Tell them to type "http" in their Lua prompt to check if the table exists. Also, I find it weird how in the Windows tutorial the windows have different colors for the window border throughout the tutorial
I forgot about the paths... hmm. I'll need to work on that.
HTTP checking is a good idea.
The Windows border changes because my desktop changes and the border colour is based off the desktop.
Quote

TheOddByte's Photo TheOddByte 18 Mar 2014

It would be easier for them to go into the lua prompt and type this to check if HTTP is enabled
if http then print("HTTP is enabled") else print("HTTP is disabled!") end
And it seems that this tutorial is aimed at vanilla minecraft right? Since it seems in FTB and Technic HTTP is enabled by default and in vanilla MC it's not.
Quote

CometWolf's Photo CometWolf 18 Mar 2014

What awsmazing suggested is easier. If it returns nil, it's disabled.

View Postawsmazinggenius, on 18 March 2014 - 05:59 AM, said:

Tell them to type "http" in their Lua prompt to check if the table exists.

Why is http off by default anyways?
Edited by CometWolf, 18 March 2014 - 10:44 AM.
Quote

oeed's Photo oeed 18 Mar 2014

View PostHellkid98, on 18 March 2014 - 10:37 AM, said:

It would be easier for them to go into the lua prompt and type this to check if HTTP is enabled
if http then print("HTTP is enabled") else print("HTTP is disabled!") end
And it seems that this tutorial is aimed at vanilla minecraft right? Since it seems in FTB and Technic HTTP is enabled by default and in vanilla MC it's not.
Easier? You mad?

View PostCometWolf, on 18 March 2014 - 10:41 AM, said:

What awsmazing suggested is easier. If it returns nil, it's disabled.

View Postawsmazinggenius, on 18 March 2014 - 05:59 AM, said:

Tell them to type "http" in their Lua prompt to check if the table exists.

Why is http off by default anyways?
I question that too. My one guess is that it's due to security.
Quote

TheOddByte's Photo TheOddByte 18 Mar 2014

View PostCometWolf, on 18 March 2014 - 10:41 AM, said:

What awsmazing suggested is easier. If it returns nil, it's disabled.

View Postawsmazinggenius, on 18 March 2014 - 05:59 AM, said:

Tell them to type "http" in their Lua prompt to check if the table exists.

Why is http off by default anyways?
I have no clue, That's a question Dan himself would have to answer.
But I doubt he will here since he doesn't even reply to PMs :P
Quote

awsmazinggenius's Photo awsmazinggenius 19 Mar 2014

oeed: I figured that, but what I'm saying is keep it the same throughout the tutorial (just set it to be one color temporarily.)
Quote

oeed's Photo oeed 19 Mar 2014

View Postawsmazinggenius, on 19 March 2014 - 05:36 AM, said:

oeed: I figured that, but what I'm saying is keep it the same throughout the tutorial (just set it to be one color temporarily.)
It wasn't really anything I thought about to be honest. I'll redo them if I find the time.
Quote

awsmazinggenius's Photo awsmazinggenius 19 Mar 2014

typo:
I soon intend to release OneOS to on the FTB, Tekkit, etc forums

should be either "on" or "in to".
Quote

MostwantedRBX's Photo MostwantedRBX 19 Mar 2014

Lol, why are you guys messing with his typing. :P He does better then half the people on the internet. Anyways, this is a good tutorial for those who don't know how to edit config files or people who didn't even know they existed. Good job.
Quote

awsmazinggenius's Photo awsmazinggenius 20 Mar 2014

View PostMostwantedRBX, on 19 March 2014 - 07:48 PM, said:

Lol, why are you guys messing with his typing. :P/> He does better then half the people on the internet. Anyways, this is a good tutorial for those who don't know how to edit config files or people who didn't even know they existed. Good job.

Because if you are writing a tutorial, you might as well make it easy to read then "to go the confine and chang it to true lol".
Quote

BytePointer's Photo BytePointer 19 Jun 2014

It's a nice tutorial! I'm sure you helped some of the newbies whose HTTPApi 'magically' switched off ;)
Quote

Tobias SN's Photo Tobias SN 09 Mar 2016

View Postawsmazinggenius, on 20 March 2014 - 04:05 AM, said:

View PostMostwantedRBX, on 19 March 2014 - 07:48 PM, said:

Lol, why are you guys messing with his typing. :P/> He does better then half the people on the internet. Anyways, this is a good tutorial for those who don't know how to edit config files or people who didn't even know they existed. Good job.

Because if you are writing a tutorial, you might as well make it easy to read then "to go the confine and chang it to true lol".

You might also consider it while writing a supposed-to-be-constuctive reply ("you might as well make it easy to read than "To go the config and change it to true lol"")
Quote