By default, each WAK HTTPOperation uses Unity’s WWW class to communicate over the wire. There are other, more robust, HTTP libraries out there and are fully supported in WAK. A couple reasons why you would want to use a library such as BestHTTP, UniWeb, or UnityHTTP are:
- WWW class is limited to the GET and POST verbs
- WWW class does not include the body of the response if HTTP status code is other than 200
All providers can be found below and require the actual asset.
- BestHttp [http://u3d.as/8wH]
- UniWeb [http://u3d.as/8wJ]
- UnityHTTP [http://u3d.as/hy2]
- UnityHTTP source code can be found here [https://github.com/andyburke/UnityHTTP]
- Download the ‘src’ and ‘lib’ folders and drop them in your projects assets.
Switching providers is easy… Add the HttpProvider attribute to the HTTPOperation class and specify one of the available types in the ‘hg.ApiWebKit.providers’ namespace. Now, this example is using UnityHTTP instead of Unity WWW class. That is all there is to it.