More hacking fixes, httpget() lua function.

Implements aren-cllc's httpget() lua method. Works perfectly.
This commit is contained in:
MichaelTheShifter 2016-07-02 11:35:27 -04:00
parent 20fcece26d
commit 5be773d4f0
2 changed files with 8 additions and 1 deletions

View file

@ -111,6 +111,13 @@ public LuaInterpreter()
/// </summary>
public void RegisterCore()
{
mod.httpget = new Func<string, string>((url) =>
{
WebRequest request = WebRequest.Create(url);
Stream requestStream = request.GetResponse().GetResponseStream();
StreamReader requestRead = new StreamReader(requestStream);
return requestRead.ReadToEnd();
});
//Shifter Extension API
mod.shifter_add_category = new Action<string>((name) =>
{