

Nothing here.
This re-queues the message on a fatal error. Get started with JavaScript To write your first JavaScript code, open your favorite text editor, such as Notepad++, Atom, or VSCode. ResponseMap.put(“WEBSVC”, ResponseFactory.getErrorResponse(err)) Return Error to Mirth to move the file to the error folder To write your first JavaScript code, open your favorite text editor, such as Notepad++, Atom, or VSCode. Var stringData = response.toString() + “\n” įileUtil.write(“C:/Outbox/Errors/” + $(“originalFilename”) + “.ERROR_RESPONSE”, false, stringData) Var outWriter = new java.io.OutputStreamWriter(outStream) Var data = connectorMessage.getEncodedData() Ĭonn.setRequestProperty (“Authorization”, globalMap.get(‘UniversalToken’)) Ĭonn.setRequestMethod(“DELETE”) // this can be post or put or get or patchĬonn.setRequestProperty(“Content-length”, data.length()) Ĭonn.setRequestProperty(“Content-type”, “application/json”) This is really beneficial when we need to loop through the requests and send them in the api. This blog is about sending the http request in Mirth interface engine using the custom javascript.

Custom HTTP Writer using Javascript in Mirth OctoOctoadmin HTTP, Javascript, mirth
