def set_fulltext(self, itemkey, payload):
headers = self.default_headers()<EOL>headers.update({"<STR_LIT:Content-Type>": "<STR_LIT:application/json>"})<EOL>req = requests.put(<EOL>url=self.endpoint<EOL>+ "<STR_LIT>".format(<EOL>t=self.library_type, u=self.library_id, k=itemkey<EOL>),<EOL>headers=headers,<EOL>data=json.dumps(payload),<EOL>)<EOL>try:<EOL><INDENT>req.raise_for_status()<EOL><DEDENT>except requests.exceptions.HTTPError:<EOL><INDENT>error_handler(req)<EOL><DEDENT>return True<EOL>
Set full-text data for an item
<itemkey> should correspond to an existing attachment item.
payload should be a dict containing three keys:
'content': the full-text content and either
For text documents, 'indexedChars' and 'totalChars' OR
For PDFs, 'indexedPages' and 'totalPages'.