title: POST request fails (rest-assured test)
body: <p>I have problem with making POST request with rest-assured.</p>
  
  <p>This code works:</p>
  
  <pre><code>given().contentType(ContentType.JSON).body("{\"key\": \"val\"}").    
          when().post(url + resource).then().assertThat().statusCode(200).body("otherVal", equalTo(otherVal)); 
  </code></pre>
  
  <p>But I was trying to use <code>param()</code> or <code>parameter()</code> methods like that:</p>
  
  <p>This one gives: </p>
  
  <pre><code>given().parameter("key", "val").                                      
          when().post(url + resource).then().assertThat().statusCode(200);  
  </code></pre>
  
  <p><code>Expected status code &lt;200&gt; doesn't match actual status code &lt;415&gt;.</code></p>
  
  <p>This: </p>
  
  <pre><code>    given().parameter("key", "val").                                                         
              when().post(url + resource).then().assertThat().body("otherVal", equalTo(otherVal));  
  </code></pre>
  
  <p><code>java.lang.IllegalStateException: Expected response body to be verified as JSON, HTML or XML but no content-type was defined in the response.
  Try registering a default parser using:
     RestAssured.defaultParser(&lt;parser type&gt;);</code></p>
  
  <p>And This: </p>
  
  <pre><code>RestAssured.defaultParser = Parser.JSON;                                                   
  given().parameter("key", "val").                                                       
          when().post(url + resource).then().assertThat().body("otherVal", equalTo(otherVal));
  </code></pre>
  
  <p><code>java.lang.IllegalArgumentException: The JSON input text should neither be null nor empty</code></p>
  
  <p>I have run out of ideas whats wrong.</p>
  
  <p>What I'm trying to do is to avoid writing full jsons for all test, it will be faster if I could skip all "" and {}. 
  Is my approach correct?</p>