Text Similarity

FREEMIUM
Door Twinword API | Bijgewerkt 9 days ago | Text Analysis
Populariteit

9.4 / 10

Latency

246ms

Serviceniveau

100%

Health Check

N/A

Terug naar alle discussies

URI too large error

Rapid account: Prabin Mpercept
prabin.mpercept
5 years ago

what causes this error?
414 Request-URI Too Large

Rapid account: Twinword
twinword Commented 5 years ago

Hi prabin.mpercept,

It looks like you might be using the HTTP GET method where the texts youโ€™re comparing are placed in the query string of the URL.

Here is an example of text1 and text2 inside the URL of a GET request:

https://twinword-text-similarity-v1.p.rapidapi.com/similarity/?text1=some+text&text2=some+other+text

[PROBLEM]

When the text is large, this will make the URL too long, thus giving you this specific error.

[SOLUTION]

Instead, you can try using an HTTP POST method instead. This would put the texts youโ€™re comparing into the body of the HTTP request and leaving your URL with just the endpoint.

This will make your POST request URL just the following:

https://twinword-text-similarity-v1.p.rapidapi.com/similarity/

In the texts youโ€™re comparing in the body of the POST request:

text1=some+text&text2=some+other+text

Please let me know if you have any questions.

Good luck!

Team Twinword

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen