title: RestAssured: Post Request return 500 Server Error
body: <p>I practicing web services using RestAssured. In the post request, it return 500 server error where i using postman to send the request and there is no error. 
  Can anyone help me debug the error? Please give some opinion. Any help is appreciate? Thanks in advance. </p>
  
  <pre><code>@BeforeSuite
      public void setup() {
          RestAssured.reset();
          ProxySpecification ps = new ProxySpecification("localhost", 8080, "http");
          RestAssured.proxy(ps);
  
          RestAssured.baseURI = "https://jsonplaceholder.typicode.com/";
          RestAssured.port = 443;
      }
  
  @Test(groups="createUser")
      public void createUser() {
          given()
              .param("userId", 1234)
              .param("id", 82342)
              .param("title", "Senior Software Engineer")
              .param("body", "Scrum Org").
          when()
              .request("POST", "/posts").
          then()
              .statusCode(200);
  
      }
  </code></pre>
  
  <p>Error Message is Expected status code &lt;200> but was &lt;500>.</p>
  
  <p>Stacktrace: </p>
  
  <blockquote>
    <p>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)   at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
    Source)   at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at
    org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
      at
    org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
      at
    org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
      at
    org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
      at
    org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:238)
      at
    org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:250)
      at
    io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:483)
      at
    io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure$validate$1.call(Unknown
    Source)   at
    org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
      at
    org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      at
    org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
      at
    io.restassured.internal.ResponseSpecificationImpl.validateResponseIfRequired(ResponseSpecificationImpl.groovy:655)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)   at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)   at
    java.lang.reflect.Method.invoke(Unknown Source)   at
    org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
      at
    org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
      at
    org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
      at
    org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
      at
    org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:169)
      at
    io.restassured.internal.ResponseSpecificationImpl.statusCode(ResponseSpecificationImpl.groovy:123)
      at
    io.restassured.specification.ResponseSpecification$statusCode$0.callCurrent(Unknown
    Source)   at
    org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
      at
    org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
      at
    org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:169)
      at
    io.restassured.internal.ResponseSpecificationImpl.statusCode(ResponseSpecificationImpl.groovy:131)
      at
    io.restassured.internal.ValidatableResponseOptionsImpl.statusCode(ValidatableResponseOptionsImpl.java:119)
      at com.peterwkc.services.Main.createUser(Main.java:75)</p>
  </blockquote>