1. I try this code

    Code:
    using Oxide.Core;
    using Oxide.Core.Libraries;namespace Oxide.Plugins
    {
        [Info("EpicPlugin", "Unknown", 1.0)]
        [Description("This example illustrates how to use a GET WebRequest.")]    class TestRequest : RustPlugin
        {
            [ChatCommand("getrequest")]
            void GetRequest(BasePlayer player, string command, string[] args)
            {
                webrequests.EnqueueGet("http://www.google.com/search?q=oxide", (code, response) => GetCallback(code, response, player), this);
            }        void GetCallback(int code, string response, BasePlayer player)
            {
                if (response == null || code != 200)
                {
                    Puts("Couldn't get an answer from Google for " + player.displayName);
                    return;
                }
                Puts("Google answered for " + player.displayName + ": " + response);
            }
        }
    }
    But an error during compilation in the console
    " The name `webrequests' does not exist in the current context"

    What am I doing wrong?
    [DOUBLEPOST=1451736199][/DOUBLEPOST]I decided error
    Code:
    var WebRequestsGet = new WebRequests();
    WebRequestsGet.EnqueueGet("http://www.google.com/search?q=oxide", (code, response) => GetCallback(code, response, player), this);
     
    Last edited by a moderator: Jan 2, 2016
  2. Wulf

    Wulf Community Admin

    It may be just 'webrequest', those Docs are being overhauled right now and that may have been missed.