@@ -39,7 +39,7 @@ public void start() throws IOException {
3939                .project (this .visualRegressionTrackerConfig .getProject ())
4040                .build ();
4141
42-         RequestBody  body  = RequestBody .create (gson .toJson (newBuild ),  JSON );
42+         RequestBody  body  = RequestBody .create (JSON ,  gson .toJson (newBuild ));
4343
4444        Request  request  = new  Request .Builder ()
4545                .url (this .visualRegressionTrackerConfig .getApiUrl ().concat ("/builds" ))
@@ -77,7 +77,7 @@ public void stop() throws IOException {
7777        Request  request  = new  Request .Builder ()
7878                .url (this .visualRegressionTrackerConfig .getApiUrl ().concat ("/builds/" ).concat (this .buildId ))
7979                .addHeader (apiKeyHeaderName , this .visualRegressionTrackerConfig .getApiKey ())
80-                 .patch (RequestBody .create ("" ,  JSON ))
80+                 .patch (RequestBody .create (JSON ,  "" ))
8181                .build ();
8282
8383        client .newCall (request ).execute ();
@@ -101,7 +101,7 @@ protected TestRunResponse submitTestRun(String name, String imageBase64, TestRun
101101                .diffTollerancePercent (testRunOptions .getDiffTollerancePercent ())
102102                .build ();
103103
104-         RequestBody  body  = RequestBody .create (gson .toJson (newTestRun ),  JSON );
104+         RequestBody  body  = RequestBody .create (JSON ,  gson .toJson (newTestRun ));
105105
106106        Request  request  = new  Request .Builder ()
107107                .url (this .visualRegressionTrackerConfig .getApiUrl ().concat ("/test-runs" ))
0 commit comments