コード例 #1
0
    public override void Main(WorkerPool boss = null)
    {
        //request = new HTTP.Request (this.httpMethod, this.url + this.endPoint);

        //request = (HTTP.Request) Activator.CreateInstance(typeof(T), this.url + this.endPoint);

        BuildRequest();

        SendRequest();

        if (!CheckErrors())
        {
            HandleResponse();
        }

        if (boss != null)
        {
            boss.CompleteJob(this);
        }
    }
コード例 #2
0
    public override void Main(WorkerPool boss = null)
    {
        //request = new HTTP.Request ("POST", this.url + "/auth/authorize_unity_fb");

        //request = new HTTP.PostRequest(this.url + "/auth/authorize_unity_fb");

        request.AddParameter("client_id", this.clientId);
        request.AddParameter("client_secret", this.clientSecret);
        request.AddParameter("grant_type", "fakebook");
        //request.AddParameter("omniauth", cookie);
        request.SetBody(cookie);



        // Add request headers
        //request.AddHeader ("Content-Type", "application/x-www-form-urlencoded");
        //request.AddHeader("Content-Type", "application/jsonrequest");
        //request.AddHeader("Content-Type", "application/json");

        Debug.Log(request.uri);
        // Send request
        request.Send();



        // Dump request response to debug console

        status   = request.response.status;
        response = new ADAGEResponse(request.response.Text);
        Debug.Log("RESPONSE ***********************************: " + response);



        if (boss != null)
        {
            boss.CompleteJob(this);
        }
    }