In my app, I need some string to be downloaded from server to use in the app. How can I upload the strings to the server?.
I've uploaded a text file at first but when sending request I received this error in logcat:
Unexpected response code 307 for:
Also, I uploaded my text in a web page body same error happened.
Please help me how to upload some text or an ArrayList
to the server and download with volley and use in the app.
This is my volley request method:
private void getOnlinePrice (){
StringRequest request=new StringRequest(Request.Method.GET,URI_SHOW_PARAMS, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
String s=response;
txtinfo.setText(s);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
});
requestQueue.add(request);
}