php – how to get key on server that retrofit2 sents-ThrowExceptions

Exception or error:

I’m trying to get key in php of @POST that retrofit sents in android.

This is my code

Java

public interface GetUser{

    @POST("tronecity/signup.php")
    Call<User> createUser(@Body User user);
}

PHP

echo json_decode($_POST['body']);

other i get error : body in $_POST is not defined

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *