Ejemplo n.º 1
0
  IEnumerator DemoRedirectControl()
  {
    _test = "DemoRedirectControl";

    HTTPRequest request = new HTTPRequest();

    request.SetURL("https://google.com").
      AppendQueryParameter("q", "unity");

    HTTPResponseMemoryStreamHandler responseHandler =
      new HTTPResponseMemoryStreamHandler();

    responseHandler.SetAllowFollowRedirects(true);
    responseHandler.SetMaxRedirectCount(10);

    using (_client = new HTTPClient(request, responseHandler))
    {
      yield return StartCoroutine(_client.WaitUntilDone());
      DebugAll(_client);
    }
  }