I am using Retrofit2 to call a rest endpoint which accepts a SQL query. When I tried testing with Postman this worked when I set Content-Type: application/sql and passed a raw string. Is there a way to pass a raw string as body using Retrofit2? The response is returned in json format. The below implementation seems to fail and I assume it is adding probably adding quotes to the front and end of the query string.
@Headers({ "Content-Type: application/sql" })
@POST(RestConstants.SQL_URL)
Call<AppResponse> query(@Body String query);
Retrofit client = new Retrofit.Builder()
.baseUrl(service_host)
.addConverterFactory(JacksonConverterFactory.create(jacksonObjMapper))
.client(getHttpClientBuilder(username, password).build())
.build();