Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

It is not working ! :/ #44

Open
Gamezpedia opened this issue Apr 8, 2018 · 0 comments
Open

It is not working ! :/ #44

Gamezpedia opened this issue Apr 8, 2018 · 0 comments

Comments

@Gamezpedia
Copy link

hi,

i don't know if it works on HTML5 target of OpenFl because i tried everything to run the below snippet , but i am always getting :

POST http://localhost:4000/ 500 (Internal Server Error)

AsyncHttp.hx:188: thNPv5ks INFO: Response HTTP Status 500
AsyncHttp.hx:197: thNPv5ks ERROR: Request failed -> Http Error #500
Tests.hx:120: ERROR 500 Internal Server Error)

Request Headers
POST / HTTP/1.1
Host: localhost:4000
Connection: keep-alive
Content-Length: 240
Origin: http://localhost:2000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Content-Type: text/plain;charset=UTF-8
Accept: /
DNT: 1
Referer: http://localhost:2000/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9

i don't know what is the problem but now i have to use OpenFL URLLoader which is working as expected
but this one was the best thing i hope you will get some time to fix this precious library thanks.

              var request = new HttpRequest
		({
			url : "http://localhost:4000/",

			callback : onResponse,
			//callbackError : onCallbackEror,
			//callbackProgress : onCallbackProgress,

			method : HttpMethod.POST,

			//headers : _headers,

			timeout : 10,
			async : true,
			http11 : true,

			content : Json.stringify('{"query":"{\n  feed {\n    title\n\t\ttext\n  }\n}\n"}'),
			contentType : "application/json" 

		}); //end HttpRequest instance

		var fingerprint:String =  request.fingerprint;
		trace("fingerprint: "+fingerprint);

		request.timeout = 20; // example to set the timeout to 20 seconds
		request.send(); // start the request as set
@Gamezpedia Gamezpedia changed the title It is not working ! It is not working ! :/ Apr 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant