Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
I am facing error 406 Not Acceptable after uploading my webservice to godady specifically on android — Gideros Forum

I am facing error 406 Not Acceptable after uploading my webservice to godady specifically on android

edited December 2014 in Bugs and issues
Hello ,

I am facing error "406 Not Acceptable" after uploading my webservice to godady specifically on android
it work perfectly on ios and even in Gideros editor.

I am facing following error in eclipse debug log :-
"406 Not Acceptable
An appropriate representation of the requested resource /admin/webservice.php could not be found on this server."

If this is the reason then why it works on ios platform that should be same error on it i think if anyone know pls rply

Thanks in advance .

Comments

  • Could be that Android is more strict or lazy regarding sending the request. Maybe headers aren't set correctly? Which framework do you use server-side?
  • Hello seppsepp ,

    i am using php framework on server-side

    i am using following code for login
    	 local data = {
    					["mode"] = "loginUser",
    					["username"] = txtUsername:getText(),
    					["password"] = txtpwd:getText()
    					}
    					--Json Call
    					local body = Json.Encode (data)
    					local url="<a href="http://dunkingmonkey.com/admin/webservice.php&quot" rel="nofollow">http://dunkingmonkey.com/admin/webservice.php&quot</a>;
    					local loader = UrlLoader.new(url,UrlLoader.POST, header,body)
    					loader:addEventListener(Event.COMPLETE, self.onComplete,loader)
    					loader:addEventListener(Event.ERROR, self.onError,loader)
    					loader:addEventListener(Event.PROGRESS, self.onProgress,loader)
    the above code works fine in Gideros Studio and ios but it is giving me error in android device can anyone please tell me issue as i am struggling through this since 3 days without any result.

    Thanks in advance
  • Hi

    add header as below

    local header = {}
    header["Content-Type"] = "application/x-www-form-urlencoded"

    and it should work well

    +1 -1 (+2 / -0 )Share on Facebook
  • Yuppp...!!!

    it works

    thanks again hgvyas123 & seppsepp

    Likes: seppsepp

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.