No answers yet from any of the LiveCode experts ? Here is some additional information and a piece of script.
I get the following debug information, The server does not seem to be able to cope with the additional information I send in the tSettings variable. But tsNetCustomSync needs to have those setting in array format, also there is no other way as I see it to hand over the document name for removal
Below is the script an below that the debug information.The debug information from tsNetSetDebugCallback("updateDebugField"):
I get the following debug information, The server does not seem to be able to cope with the additional information I send in the tSettings variable. But tsNetCustomSync needs to have those setting in array format, also there is no other way as I see it to hand over the document name for removal
Below is the script an below that the debug information.
CODE:
put "http://localhost:3001/api/v1/system/remove-documents" into tURLString ------------------------------------------------ put tDocumentName into aSettings["names"] put "DELETE" into tRequest ------------------------------------------------ -- Prepare headers, in Headers do not use crlf but use lf put "Content-Type: application/json" & lf & \ "accept: application/json" & lf & \ "Authorization: Bearer " & tApiKey into tHeaders ------------------------------------------------------------------ put tHeaders into tPrePostHeaders ------------------------------------------------------------------ # Make the API call using TSNet put "" into field "BotInfoWindow" // empty field first tsNetSetDebugCallback("updateDebugField") tsNetInit put tsNetCustomSync(tURLString, tRequest, tHeaders, tRecvHeaders, tResult, tBytes,aSettings) into tData // tsNetCustomSync(<pURL>, <pRequest>, <xHeaders>, <rOutHeaders>, <rResult>, <rBytes>, [<pSettings>]) tsNetClose
http://localhost:3001/api/v1/system/remove-documents: Trying ::1:3001...
http://localhost:3001/api/v1/system/remove-documents: Trying 127.0.0.1:3001...
http://localhost:3001/api/v1/system/remove-documents: Connected to localhost (127.0.0.1) port 3001 (#0)
http://localhost:3001/api/v1/system/remove-documents: DELETE /api/v1/system/remove-documents HTTP/1.1
Host: localhost:3001
Content-Type: application/json
accept: application/json
Authorization: Bearer NHNV7Q7-ERT4TRX-KEZEJ2S-TKEDR65
http://localhost:3001/api/v1/system/remove-documents: Mark bundle as not supporting multiuse
http://localhost:3001/api/v1/system/remove-documents: HTTP/1.1 500 Internal Server Error
http://localhost:3001/api/v1/system/remove-documents: X-Powered-By: Express
http://localhost:3001/api/v1/system/remove-documents: Vary: Origin
http://localhost:3001/api/v1/system/remove-documents: Content-Type: text/plain; charset=utf-8
http://localhost:3001/api/v1/system/remove-documents: Content-Length: 21
http://localhost:3001/api/v1/system/remove-documents: ETag: W/"15-/6VXivhc2MKdLfIkLcUE47K6aH0"
http://localhost:3001/api/v1/system/remove-documents: Date: Tue, 21 Jan 2025 10:10:38 GMT
http://localhost:3001/api/v1/system/remove-documents: Connection: keep-alive
http://localhost:3001/api/v1/system/remove-documents: Keep-Alive: timeout=5
http://localhost:3001/api/v1/system/remove-documents:
http://localhost:3001/api/v1/system/remove-documents: Connection #0 to host localhost left intact
Statistics: Posted by mrcoollion — Tue Jan 21, 2025 11:40 am