I'm trying to make an api call using the below code
'''
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
//this is where the error is beign thrown
RequestBody body = RequestBody.create(mediaType, "text="+this.body);
Request request = new Request.Builder()
.url("https://text-sentiment.p.rapidapi.com/analyze")
.post(body)
.addHeader("content-type", "application/x-www-form-urlencoded")
.addHeader("x-rapidapi-key", "API Key")
.addHeader("x-rapidapi-host", "Host")
.build();
client.newCall(request).enqueue(new Callback() {
'''
But when I run it I get "{"status":100,"errormsg":"Failed to parse text in form param"} "
This only happens when I try to make a call with a bigger string, when smaller strings are applied I get the results i need to have.