Utility - HTTP (Async)::POST JSON issues
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-05-22 07:24 PM
I'm trying to POST a simple JSON object , but I keep getting an error. Also I'm calling the startup action before POST.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Utility___HTTP__Async_.ExecuteRequest(HttpMethod method, String descriptor, String url, DataTable requestHeaders, String contentType, DataTable nvContent, String textContent, DataTable fileContent, String username, String password, String bearerToken)
at Utility___HTTP__Async_.<>c__DisplayClass5_0.<ExecuteAsync>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
I created a request collection to match the docs. If I leave out a field regardless of it saying it's optional, then I get an error in regards to that field so I have fields that are there, but not populated too. (optional ones). Also the docs say JSON needs to be a string so I assume you have to stringify it, but I tried that and just wrapping JSON object in quotes like this
"\"{'test': 'testing'}\""
AND
"{'test': 'testing'}"
but that doesn't seem to work unless something else is causing my POST issue.
Here's my request collection
What am I doing wrong? I appreciate any help!
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-05-22 11:08 PM
@Jason Cappleman,
Have you taken a look at the example performance measurement process included on the asset page for the async HTTP VBO?
If you're sending just regular JSON you'd want the TextContent field of the record to look something like this:

Do not place double quotes around the value. This is just like a Text data item. Also, your ContentType entry should just be application/json. Do not include double quotes around the value. Text data items, in Blue Prism, are not double quoted. Double quotes are only necessary when you're dealing for a Calculation stage/field value.
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------
Have you taken a look at the example performance measurement process included on the asset page for the async HTTP VBO?
If you're sending just regular JSON you'd want the TextContent field of the record to look something like this:
Do not place double quotes around the value. This is just like a Text data item. Also, your ContentType entry should just be application/json. Do not include double quotes around the value. Text data items, in Blue Prism, are not double quoted. Double quotes are only necessary when you're dealing for a Calculation stage/field value.
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------
