I have the following code:
Function filejson(json) Dim objStream, strData Set objStream = CreateObject("ADODB.Stream") objStream.CharSet = "utf-8" objStream.Open objStream.LoadFromFile(json) strData = objStream.ReadText() filejson = strData End Function Function http2json(url) Set http = CreateObject("Microsoft.XmlHttp") http.open "GET", url, FALSE http.send "" '<------- Line 13 http2json=http.responseText End Function Function str2json(json,value) Set scriptControl = CreateObject("MSScriptControl.ScriptControl") scriptControl.Language = "JScript" scriptControl.AddCode("x="& json & ";") str2json= scriptControl.Eval( "x"& value ) End Function Function get_json_from_file(json,value) get_json_from_file=str2json(filejson(json),value) End Function Function get_json_from_http(url,value) get_json_from_http=str2json(http2json(url),value) End Function Function save_json_from_http(url,loc) Set fso = CreateObject("Scripting.FileSystemObject") fullpath = fso.GetAbsolutePathName(loc) Dim objStream, strData Set objStream = CreateObject("ADODB.Stream") objStream.CharSet = "utf-8" objStream.Open objStream.WriteText http2json(url) objStream.SaveToFile fullpath, 2 save_json_from_http=fullpath End Function Wscript.Echo save_json_from_http("http://api.themoviedb.org/3/authentication/session/new?api_key=#####some_api_key_example#####&request_token=#####some_default_request_token######&_ctime_json_=1372670635.164760555","tmdb\temp\_tmdb_sock_w.164519518.2109")
When I run this code, I get the following error.

If I delete &request_token=#####some_default_request_token###### , it works fine.
I also tried this: I added request_token again, and I just typed in a random character in it, for example, rexfuest_token , and it worked strangely. There seems to be a bad parsing in msxml3.dll. with request_token word.
Ideas?
Devian
source share