Example #1
0
    public void Post(UWebRequest request, UWebArg customArgs, UWebMgr.OnWebResponse onResponse, UWebMgr.OnWebError onError, float timeOutInterval)
    {
        UWebRequestProxy proxy = new UWebRequestProxy();

        proxy.m_Request = request;

        if (request.isCompressed)
        {
            customArgs.Add("compress", 1);
        }

        if (m_isUrlArgs)
        {
            proxy.m_UrlArgs    = customArgs.ToString();
            proxy.m_MergedArgs = customArgs.GetMergedArgs();
        }
        else
        {
            proxy.m_Form = customArgs.ToForm();
        }

        proxy.m_OnResponse      = onResponse;
        proxy.m_OnError         = onError;
        proxy.m_TimeOutInterval = timeOutInterval;
        proxy.m_LocalArg        = customArgs.localArg;

        m_RequestQueue.Enqueue(proxy);
    }
Example #2
0
    public void AddArgument(string key, object value)
    {
        if (m_Args == null)
        {
            m_Args = new UWebArg();
        }

        m_Args.Add(key, value);
    }
Example #3
0
 public void SetCustomArg(string key, object value)
 {
     m_CustomArgs.Add(key, value);
 }