0
Q:

api response format

GET http://localhost:60464/api/student HTTP/1.1
User-Agent: Fiddler
Host: localhost:1234
Accept: application/json
0
{  aps: {    alert: {      "loc-key":  "REQUEST_FORMAT",      "loc-args": [@message]    },    sound:      "default",    id:         @id,    request_id:  @request_id,    push_type:  push_type,    payload:    @payload  },  pn_gcm: {    data: {      message: @message,    }  }}
0
{    "success": true,    "message": "Category deleted successfully",    "data": {}}
0
public class Student
{
    public int Id { get; set; }
    public string Name { get; set; }
}

public class StudentController : ApiController
{
    public Student Post(Student student)
    {
        // save student into db
        var insertedStudent = SaveStudent(student);

        return insertedStudent;
    }
}
0
POST http://localhost:60464/api/student?age=15 HTTP/1.1
User-Agent: Fiddler
Host: localhost:60464
Content-Type: application/json
Content-Length: 13

{
  id:1,
  name:'Steve'
}
0

New to Communities?

Join the community