Skip to content

Commit

Permalink
Add note on limits for the length of input text in the REST interface
Browse files Browse the repository at this point in the history
  • Loading branch information
snomos committed May 22, 2024
1 parent febc14b commit 5c02ce1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ at runtime.
Most functions are mapped to endpoints in the form of `/{function}/{languageCode}`. For example, spelling requests
for the Northern Sámi language are to be made to `/speller/se`.

NOTE: The length of the data argument below (the text between the quotes following `"text:"` in the examples below) is limited to 2^15-12 bytes, ie 32 756 bytes. Remember that non-ASCII characters will use at least two bytes each in UTF-8 encoding, so in practice, the usable amount of text varies by language.

Example for checking the spelling of a word with curl on the default server:

[source]
Expand Down
12 changes: 12 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,18 @@ <h4 id="_rest">REST</h4>
<p>Most functions are mapped to endpoints in the form of <code>/{function}/{languageCode}</code>. For example, spelling requests
for the Northern Sámi language are to be made to <code>/speller/se</code>.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
The length of the data argument below (the text between the quotes following <code>"text:"</code> in the examples below) is limited to 2^15-12 bytes, ie 32 756 bytes. Remember that non-ASCII characters will use at least two bytes each in UTF-8 encoding, so in practice, the usable amount of text varies by language.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Example for checking the spelling of a word with curl on the default server:</p>
</div>
Expand Down

0 comments on commit 5c02ce1

Please sign in to comment.