A method for making HTTP requests on Unity iOS?

前端 未结 4 469
北荒
北荒 2020-12-04 22:33

I need to send HTTP requests with all the standard RESTful methods and access to the body of the request in order to send/receive JSON with it. I\'ve looked into,

W

4条回答
  •  -上瘾入骨i
    2020-12-04 23:09

    There is a way of doing this asynchronously, without using IEnumerator and yield return stuff. Check out the eDriven framework.

    HttpConnector class: https://github.com/dkozar/eDriven/blob/master/eDriven.Networking/Rpc/Core/HttpConnector.cs

    I've been using JsonFX with HttpConnector all the time, for instance in this WebPlayer demo: http://edrivenunity.com/load-images

    Not having PUT and DELETE is not a big issue, since all of it could be done using GET and POST. For instance I'm successfully communicating with Drupal CMS using its REST service.

提交回复
热议问题