List of HTTP User-Agent's in Unity for various platforms?

Hello again :slight_smile:

I’m writing here server(java) and client(unity) for my current project, and one of the security tasks is to skip any request that came not from our client.

One of the things we check in first place is HTTP User-Agent value.
But unfortunatly WWWForm doesnt allow to set User-Agent and in Unity Script Refference it is says “Read-Only”.

Thats fine with us not being able to modifay “User-Agent” manually as Unity set its own User-Agent. for example when I send request from (Win) Unity Editor, the agent is:
“UnityPlayer/4.3.0f4 (”

but the problem is that I cant find anywhere list of all avaliable headers or even mentioning of how those agents are changed depending on the platform.

Would anyone be able to list common agents for:

Web (Win/OSx)



as I dont have all equipment to build project test it, and actually project itself is far away from it firs test build.

Thank you in advance :slight_smile:

Ehhh my bad, I find a way to overwrite headers and User-Agent.

	private IEnumerator CoroutineWebRequest(string post)

//		WWWForm POSTform = new WWWForm();
//		POSTform.AddField("data", post);
        Hashtable headers = new Hashtable();
        headers.Add("User-Agent", userAgent);
        string data = "data=" + post;
        WWW www = new WWW(finalUrl, Encoding.UTF8.GetBytes(data), headers);
* * # Skipped # * *

As you see you dont need to use WWWForm, you can just convert your post data string to bytes and create hashtable with headers you need

in WWW class it is 4th method:

WWW(string url, byte[] postData, Hashtable headers);

Sorry for creating taht question without doing proper research! but hope it will help someone silly like me in the future :slight_smile: