We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Below is my code. AndroidNetworking.post("http://"+ Login.ip+"/api/teachers/test_courses") .addBodyParameter(added_courses_list) .setTag("test") .setPriority(Priority.IMMEDIATE) .build() .getAsString(new StringRequestListener() { @OverRide public void onResponse(String response) {
Log.i("success",response); } @Override public void onError(ANError anError) { Log.i("Error code", String.valueOf(anError.getErrorCode())); Log.i("Error Detail",anError.getErrorDetail()); Log.i("Error Body",anError.getErrorBody()); } });
and this is code of web api.
[HttpPost] [Route("test_courses")] public HttpResponseMessage test_courses([FromBody] List<model_teacher_add_courses> obj) { HttpResponseMessage message = null; if (obj == null) { message = Request.CreateResponse("Its null."); } else { model_teacher_add_courses m = new model_teacher_add_courses(); message = Request.CreateResponse(obj); }
return message; }
when i run this code "its null" is returned. i think list is not reaching to web api. Kindly help me.
The text was updated successfully, but these errors were encountered:
feat: can pass list of object to addBodyParameter amitshekhariitbhu#509
8a49879
No branches or pull requests
Below is my code.
AndroidNetworking.post("http://"+ Login.ip+"/api/teachers/test_courses")
.addBodyParameter(added_courses_list)
.setTag("test")
.setPriority(Priority.IMMEDIATE)
.build()
.getAsString(new StringRequestListener() {
@OverRide
public void onResponse(String response) {
and this is code of web api.
return message;
}
when i run this code "its null" is returned. i think list is not reaching to web api.
Kindly help me.
The text was updated successfully, but these errors were encountered: