title: How can I determine the order of parameters for x-www-form-urlencoded in Microprofile RestClient?
body: <h2>Use Case</h2>
  <p>I have following rest client</p>
  <pre><code>@RegisterRestClient(configKey = &quot;service&quot;)
  public interface Service {
  
    @POST
    @Path(&quot;Invoice&quot;)
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Response request(@QueryParam(&quot;instance&quot;) String instance, @BeanParam Input input);
  
  }
  </code></pre>
  <p><code>Input</code> is a class which is a POJO including properties like</p>
  <pre><code>public class Input {
  
    @FormParam(&quot;title&quot;)
    public String title;
  
    @FormParam(&quot;description&quot;)
    public String description;
  </code></pre>
  <h2>Problem</h2>
  <p>The request to the API is working fine, <strong>but</strong> in my case, the order of properties does matter (The reason behind that is something, I cannot answer at the moment, sorry).</p>
  <p>So sending <code>title=Test&amp;description=Testdescription</code> is different to <code>description=Testdescription&amp;title=Test</code>.</p>
  <h2>Other solutions I have tried</h2>
  <ol>
  <li>With <code>Form</code> instead of POJO: No data is send to the server</li>
  </ol>
  <pre><code>  @POST
    @Path(&quot;Invoice&quot;)
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    CustomResponse requestForm(@QueryParam(&quot;instance&quot;) String instance, @BeanParam Form form);
  </code></pre>
  <ol start="2">
  <li>With <code>Entit&lt;Form&gt;</code>: No data is send to the server</li>
  </ol>
  <pre><code>  @POST
    @Path(&quot;Invoice&quot;)
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    CustomResponse requestForm(@QueryParam(&quot;instance&quot;) String instance, @BeanParam Entity&lt;Form&gt; form);
  </code></pre>
  <h2>Assumption</h2>
  <p>I found out, that <code>org.jboss.resteasy.client.jaxrs.internal.proxy.processors.FormProcessor</code> is using a <code>HashMap</code> internally. I think that is exactly the problem, because there is no guaranteed order. Is my assumption correct?</p>
  <h2>Question</h2>
  <p>How can I work around that and always provide the same order for the API using the Microprofile Rest Client.</p>
  <h2>Workaround</h2>
  <p>It works with a <code>org.jboss.resteasy.client.jaxrs.ResteasyClient</code> invoking like</p>
  <pre><code> Response response = target
              .request(MediaType.APPLICATION_JSON)
              .accept(MediaType.APPLICATION_FORM_URLENCODED)
              .post(Entity.form(form));
  </code></pre>