使用排球,我POST StringRequest和我得到的錯誤,當我訪問的URL,因爲它是排球,BasicNetwork.performRequest:意外的響應碼405,同時使StringRequest
https://www.google.com/?gfe_rd=cr&ei=vX8jVdTvOsOq8weigYHICA&gws_rd=cr&fg=1
但是當使用http而不是https以上,它不會給出錯誤並且運行良好。
的cookie和客戶端的代碼如下,
DefaultHttpClient client_R = new DefaultHttpClient();
RequestQueue queue_R = Volley.newRequestQueue(this, new HttpClientStack(client_R));
CookieStore store_R = client_R.getCookieStore();
Cookie cookie_R = new BasicClientCookie("Example_Cookie", "80");
store_R.addCookie(cookie_R);
下面
是logcat的輸出,
[199] BasicNetwork.performRequest: Unexpected response code 405 for https://www.google.com/?gfe_rd=cr&ei=TX4jVcChFaTj8wehzoCgCw&gws_rd=cr&fg=1
爲什麼它給錯誤?由於某些網址有https,因此它正在運行。
@ Alexis是的,我用過,我已經更新了我的問題。 –
@Alexis Burgos:是否有可能對https請求使用抽象? – jublikon
我幾周前用Android Marshmallow得到了這個問題。錯誤是服務器端(太舊的證書)。 我使用OkHttp在我的應用程序上使用HTTPS(用於訂閱密碼恢復)。 我只使用2個不同的客戶端(1個用於http,1個用於https與SSL工廠)。 –