Here i am using retrofit post request:-
RequestBody name = RequestBody.create(MediaType.parse("text/plain"), et_Name.getText().toString());
RequestBody shop = RequestBody.create(MediaType.parse("text/plain"), et_Name.getText().toString());
RequestBody shopreg = RequestBody.create(MediaType.parse("text/plain"), et_Name.getText().toString());
RequestBody gst = RequestBody.create(MediaType.parse("text/plain"), et_Name.getText().toString());
RequestBody pan = RequestBody.create(MediaType.parse("text/plain"), et_Name.getText().toString());
RequestBody phone = RequestBody.create(MediaType.parse("text/plain"), et_Name.getText().toString());
RequestBody userid = RequestBody.create(MediaType.parse("text/plain"), "78");
Map<String, RequestBody> data = new HashMap<>(); //full_name, shop_name, shop_reg_no, gst_no, pan_no, user_id, phone_no
data.put("user_id", userid);
data.put("full_name", name);
data.put("shop_name",shop);
data.put("shop_reg_no", shopreg);
data.put("gst_no",gst); //22AAAAA0000A1Z5
data.put("pan_no", pan); //AAAPL1234C
data.put("phone_no", phone);
RetrofitInterface jsonpost = ServiceGenerator.createService(RetrofitInterface.class,"https://www.khaokamao.in/");
Call<Registration_Repo> call = (Call<Registration_Repo>) jsonpost.post(data);
call.enqueue(new Callback<Registration_Repo>() {
@Override
public void onResponse(Call<Registration_Repo> call, retrofit2.Response<Registration_Repo> response) {
if (response.isSuccessful()){
assert response.body() != null;
String name = response.body().getData().getFull_name();