Send post data to server using Volley android

后端 未结 5 1519
情话喂你
情话喂你 2021-02-10 04:08

I am trying to send some data to the server using the Volley library.

   private void registerUser(final String email, final String username,
                            


        
5条回答
  •  终归单人心
    2021-02-10 04:44

    First of all you are not sending json to your server. You are sending parametrized url with post method and getting json text as response.

    I think the problem is the response from the server which is supposedly json. But from your log, this text "---- YOUR DATA ----" which you get from Log.d(TAG, "Register Response: " + response.toString()); is not at all json formatted . So you need to modify your server to respond in correct json format.

提交回复
热议问题