title: How to POST with 2 parameters using curl? REST. Java
body: <p>I want introduce two String params (type and content) in the method "createPost".</p>
  
  <p>I am using this line:</p>
  
  <pre><code>curl -i -u pepe:pepe -d 'type=Link&amp;content=www' --header "Content-Type: application/json"  http://localhost:8080/web-0.0.1-SNAPSHOT/api/user/post
  </code></pre>
  
  <p>But... that line introduces "type=Link&amp;content=www" in the first parameter and leaves the second empty.</p>
  
  <p>The method is this:</p>
  
  <pre><code>@POST
  @Path("/post")
  @Consumes(MediaType.APPLICATION_JSON)
  public Response createPost(@FormParam("type") String type,  @FormParam("content") String content) { 
      postEJB.createPostUserRest(type, content);
      URI userURI = uriInfo.getAbsolutePathBuilder().build();
      return Response.created(userURI).build();
  }
  </code></pre>
  
  <p>How could I enter "Link" in the first and "www" in the second?</p>
  
  <p>Many thanks to all and sorry for my poor English.</p>