Unity项目 短连接 put支持

2018-6-29 雨辰 网络通信协议

最近做项目短连接 支持 put 方式,印象中unity www 支持 get,post 。put好像没有支持。怎么办呢?解决方案来了。

 

byte[] body = Encoding.UTF8.GetBytes(jsonStr);

        Dictionary<string, string> headers = new Dictionary<string, string>();
        headers.Add("Content-Type", "application/json");
        headers.Add("X-HTTP-Method-Override", "PUT");
        WWW postData = new WWW(_url, body, headers);

        yield return postData;
        if (postData.error != null)
        {
            Debug.LogError(postData.error);
        }
        else
        {
            //Debug.Log(postData.text);
            if (action != null)
            {
                action(postData);
            }
        }

标签: 技术问题 网络通信协议

评论:

xlbutt
2021-06-25 00:26
<a href="https://www.dalezeskind.com/qipao-formal-%C5%A1aty-satyc">qipao formal 拧aty</a> <a href="https://www.cetdomain.com/tommy-hilfiger-snapback-cappello-cappelloa">tommy hilfiger snapback cappello</a> <a href="https://www.ibmwsc.com/fly-waterproof-boots-bootsa">fly waterproof boots</a> <a href="https://www.winzuk.com/hochfrontpumps-paul-green-stiefeld">hochfrontpumps paul green</a> <a href="https://www.physalisfruit.com/portemonnee-dekking-hoesjea">portemonnee dekking</a> <a href="https://www.pangsuankaew.com/youth-nike-denver-broncos-58-von-miller-limited-olive-2017-salute-to-service-nfl-jersey-jerseyc">youth nike denver broncos 58 von miller limited olive 2017 salute to service nfl jersey</a>
xlbutt https://www.xlbutt.com/

发表评论:

朱文华 joyimp|@2011-2021 京ICP备16030765号-2