以下の内容はhttps://nakamura001.hatenablog.com/entry/20120825/1345858810より取得しました。


HTTP通信のヘッダ情報を取得する

公式のリファレンスには記載されていないフィールドですが responseHeaders で取得出来ます。

C#のサンプル】

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class Test : MonoBehaviour {
	private string res;
	IEnumerator download () {
		string url = "http://www.unity3d.com/";
		WWW www = new WWW(url);
		yield return www;
		res = "";
		if (!string.IsNullOrEmpty(www.error) || string.IsNullOrEmpty(www.text)) {
			res = "error";
		} else {
  			foreach (KeyValuePair<string, string> kv in www.responseHeaders) {
  				res += kv.Key + " -> " + kv.Value + "\n";
  			}
		}
	}
	void OnGUI () {
		if (GUI.Button(new Rect(5, 5, 200, 20), "Test")) {
			StartCoroutine(download());
		}
		GUI.Label(new Rect(5, 30, Screen.width, 200), res);
	}
}



以上の内容はhttps://nakamura001.hatenablog.com/entry/20120825/1345858810より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14