Skip to content

VolleyPlus BasicNetwork.performRequest: Unexpected response code 500 for http://takeone.ade.co.ke/index.php #73

Description

@xngigez

I ma getting the above error when I try to submit data via volleyplus to a server. The link works with regular google volley and on localhost.

`public class MainActivity extends AppCompatActivity {
public static final String TAG = "Message";
static String URL_API = "http://takeone.ade.co.ke/index.php";
Button post_button;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    post_button = findViewById(R.id.post_button);
    post_button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            RequestQueue mRequestQueue = Volley.newRequestQueue(getApplicationContext());
            SimpleMultiPartRequest smr = new SimpleMultiPartRequest(Request.Method.POST, URL_API,
                    new Response.Listener<String>() {
                        @Override
                        public void onResponse(String response) {
                            Log.i(MainActivity.TAG, response);
                        }
                    }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError error) {
                    Log.i(MainActivity.TAG, "VolleyError: " + String.valueOf(error));
                    error.printStackTrace();
                }
            });
            //smr.addMultipartParam("param string", "data:text"," data text");

            smr.setShouldCache(false);
            mRequestQueue.getCache().clear();
            mRequestQueue.add(smr);
        }
    });
}

}`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions