title: Jersey returns HTTP Status 405 - Method Not Allowed
body: <p>I have a very simple endpoint using Jersey. My URL is static, it doesn't require any request parameters. It looks like this: </p>
  
  <pre><code>@GET
  @Path("/mydata")
  @Produces(javax.ws.rs.core.MediaType.APPLICATION_JSON)  
  public String getData()  {
    return "{'name': 'value'}";
  }
  </code></pre>
  
  <p>However, whenever I request this URL, I always receive a HTTP Status code of 405 - Method Not Allowed.</p>
  
  <p>The weird thing is, that if I change the <code>@Path</code> annotation and define a path variable e.g. <code>@Path("/chart/{blah}")</code> it works fine.</p>
  
  <p>Does anyone have an idea why I have to define a path variable to get this to work? I don't need a path variable and it seems silly to add one just to get a 200 response.</p>