title: Retrofit 2 - Send Model in @Body as FormData NOT as JSON
body: <p>I'm trying to send the following java model as form encoded body <strong>WITHOUT</strong> the wrapping <code>{}</code>. I've tried everything I can find to send a Model <strong>NOT</strong> as JSON but as form encoded data using Retrofit 2.</p>
  
  <pre><code>// Sends as JSON
  @Headers("Content-Type:application/x-www-form-urlencoded")
  @POST(SERVICES + USERS)
  Observable&lt;UserInfoResponse&gt; signupUser(@Body SignUpParams params);
  
  // Works
  @FormUrlEncoded
  @POST(SERVICES + USERS)
  Observable&lt;UserInfoResponse&gt; signupUser(
          @Field("approve") boolean approve,
          @Field("daily_newsletter") int newsletter,
          @Field("include_order_info") boolean includeOrderInfo,
          @Field("is_21") int is21,
          @Field("is_guest") int isGuest,
          @Field("method") String method,
          @Field("email") String email,
          @Field("password") String password,
          @Field("oauth_token") String oauthToken
  );
  </code></pre>
  
  <p>Here's our setup if it helps</p>
  
  <pre><code>// Dagger Provider
  @Provides
  @Singleton
  @Named(JT_API)
  Retrofit provideJTSecureApiRetrofit(OkHttpClient okHttpClient, Gson gson) {
      Retrofit retrofit = new Retrofit.Builder().client(okHttpClient)
              .baseUrl(jtBaseUrl)
              .addConverterFactory(GsonConverterFactory.create(gson))
              .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
              .build();
      return retrofit;
  }
  
  @Provides
  @Singleton
  OkHttpClient provideOkHttpClient(JTApp app) {
      Interceptor addUrlParams = chain -&gt; {
          Request request = chain.request();
          HttpUrl url = request.url()
              .newBuilder()
              .addQueryParameter("app_version", BuildConfig.VERSION_NAME)
              .build();
  
          request = request.newBuilder()
              .url(url)
              .build();
          return chain.proceed(request);
      };
  
      OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder();
  
      okHttpClientBuilder.addInterceptor(addUrlParams);
  
      // this doesn't seem to do anything…
      okHttpClientBuilder.addInterceptor(chain -&gt; {
          Request original = chain.request();
  
          Request.Builder requestBuilder = original.newBuilder()
                  .addHeader("Content-Type", "application/x-www-form-urlencoded");
  
          Request request = requestBuilder.build();
  
          return chain.proceed(request);
      });
  
      okHttpClientBuilder.readTimeout(JTApp.HTTP_TIMEOUT, TimeUnit.SECONDS)
              .connectTimeout(JTApp.HTTP_TIMEOUT, TimeUnit.SECONDS);
  
      return okHttpClientBuilder.build();
  }
  </code></pre>