I have a workflow defined on the Workflow Tasks list and I have a simple REST call to that same list and then I repeat the exact same REST call to that list and the first one works like a charm, the second one does not. It Hangs and the error seems to imply the results are coming back via XML and not JSON. Though the Dictionary, I've defined have the following structure,
Accept String application/json;odata=verbose
Content-Type String application/json;odata=verbose
My original code actually had the second REST Call to a different List, but to debug, simplify, I used an exact copy. I even put it into a different Stage to see if that made a difference. I even used the exact same variables for the Call and tried using completely different variables.
What is going on here? Why is the second call which now is exactly coded as the first call returning as XML. The message I get while it is hung up is:
RequestorId: 65d32ce8-525e-74ba-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.IO.InvalidDataException: Unable to deserialize HTTP response content. Expected ContentType : 'application/json', 'text/plain' or 'text/html', Received ContentType : 'application/atom+xml'. Content (truncated) : 'fd1431e7-4227-46b2-afcf-2f025ef99f7a2019-05-21T16:07:30Z'. ResponseStatusCode : 'OK' Request Uri : 'https://xxx/hc/teams/MES//_api/lists/GetByTitle('Workflow Tasks')/Items?$select=Title&$filter=(Project_x0020_ID eq 'Sample1 23') and (TaskUID eq '0') and (PercentComplete ne 1)' at Microsoft.Activities.Messaging.SendHttpRequest.OnReceiveResponse(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)