**Relevant JS**:

```
$.ajax({
    type : "POST",
    contentType : 'application/json; charset=utf-8',
    dataType : 'json',
    url : "post",
    data : JSON.stringify(person),
    success : function() {

    },
    error : function() {
        alert("Error");
    }
});

```

**Relevant Controller Code:**

```
@ResponseStatus(HttpStatus.OK)
@RequestMapping(value = "/post", method = RequestMethod.POST)
public void posted(@RequestBody Person person) {
    System.out.println("Post");
    System.out.println(person.toString());
}

```

**Problem:**

After posting, the controller behaves like everything worked just fine. My print statements fire and person.toString() produces expected results. However, my ajax call fails, alerting an "Error", and I can't figure out why, because other than that, everything is working just fine.

I tried using Postman to post the JSON manually, and I'm getting a response of "415 Unsupported Media Type", and after some digging, I still don't know how to deal with this error so my success() function fires. Any ideas?