title: Http 415 Unsupported Media type error with JSON POST
body: <p>I am trying to execute project
  <a href="https://github.com/bava/springrest-book/tree/master/Chapter4/final/quick-poll-ch4-final" rel="nofollow noreferrer">https://github.com/bava/springrest-book/tree/master/Chapter4/final/quick-poll-ch4-final</a> </p>
  
  <p>My controller is 
  <a href="https://github.com/bava/springrest-book/blob/master/Chapter4/final/quick-poll-ch4-final/src/main/java/com/apress/controller/PollController.java" rel="nofollow noreferrer">https://github.com/bava/springrest-book/blob/master/Chapter4/final/quick-poll-ch4-final/src/main/java/com/apress/controller/PollController.java</a></p>
  
  <p>Only change i have done is using Lombok ( not in Poll class for now ) </p>
  
  <pre><code>@ToString   
  @Entity
  public class Option {
      @Id
      @GeneratedValue
      @Column(name="OPTION_ID")
      @Getter 
      @Setter
      private Long id;
  
      @Column(name="OPTION_VALUE")
      @Getter 
      @Setter
      private String value;
  }
  </code></pre>
  
  <p>I am getting error</p>
  
  <pre><code>{"timestamp":1448542212469,"status":415,"error":"Unsupported Media Type","exception":"org.springframework.web.HttpMediaTypeNotSupportedException","message":"Content type 'text/plain;charset=UTF-8' not supported","path":"/polls"}
  </code></pre>
  
  <p>When sending a POST request</p>
  
  <pre><code>{
      "question": "Who will win SuperBowl this year?",
      "options": [
                         {"value": "New England Patriots"},
                         {"value": "Seattle Seahawks"},
                         {"value": "Green Bay Packers"},
                         {"value": "Denver Broncos"}]
  }
  </code></pre>
  
  <p>Not sure what i am doing wrong
  <a href="https://i.stack.imgur.com/HJ2xR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HJ2xR.png" alt="enter image description here"></a>
  <strong>Note</strong> : Get is working fine ( can try it only with 0 entries for now )</p>