11.7
I am trying to send a PATCH to a REST service.
def var sendData as "System.Byte[]" no-undo.
oUri = new System.Uri(wc:BaseAddress + 'tasks').
sendData = System.Text.Encoding.UTF8:GetBytes(ipData).
wc:UploadData(oUri,'PATCH',sendData).
How do I do this:
sendData = System.Text.Encoding.UTF8:GetBytes(ipData). ???
//Geir Otto
Got it to work....
def var sendData as "System.Byte[]" no-undo.
def var responseArray as "System.Byte[]" no-undo.
def var UTF8 as System.Text.Encoding no-undo.
UTF8 = System.Text.Encoding:UTF8.
oUri = new System.Uri(wc:BaseAddress + 'tasks' + '?taskAssignmentId=' + ipAssignmentId + '&newStatus=' + ipNewStatus).
sendData = UTF8:GetBytes(ipData).
responseArray = wc:UploadData(oUri,'PATCH',sendData).
lc = UTF8:GetString(responseArray, 0, responseArray:Length).
RETURN lc.