Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-292

POST methods cannot consume JSON: exception message is "GET method cannot have a body".

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2.1.GA
    • 1.1.GA
    • None

      POST operations that consume JSON are failing with "GET method cannot have a body".

      @POST
      @Path("/members/

      {key}

      ")
      @Consumes(MediaType.APPLICATION_JSON)
      @Produces(MediaType.APPLICATION_JSON)
      public Member saveMember(@PathParam("key") int key, Member member)

      • All methods that do not consume JSON work just fine. The ProxyFactory client (used for my unit tests) will fail on any resource POST consuming JSON.
      • AJAX calls directly from the browser work fine in both directions, so the issue is limited to the client proxy that RESTEasy generated.
      • The 500 error message is "GET method cannot have a body".

              patriot1burke@gmail.com Bill Burke (Inactive)
              treespace_jira treespace (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: