cancel
Showing results for 
Search instead for 
Did you mean: 

Internal: Unexpected error Cannot send a content-body with this verb-type

MarcoD_Incà
Level 3

I'm having some trouble getting a GET Action with body to work in BluePrism (using web api service).

It seems that when I try to include an Action that sends a GET with body when I reach that stage this error gets thrown:

Internal : Unexpected error Cannot send a content-body with this verb-type.

What I've tried:

  • Using a different verb-type / passing parameters in the query instead of the body, unfortunately i don't have control over the endpoint i'm trying to reach so this didnt work as it only accepts a GET containing data in the body
  • Using BluePrism HTTP Utility to send the call, this has the same problem as the Web API Service
  • Compiling the body via code instead of using a template

I haven't been able to find anyone that made it work in BluePrism and there doesn't seem to be much documentation on this issue so any help would be appreciated.

Thanks!

9 REPLIES 9

Hi Marco,

Typically HTTP POST requests have body in the request. Which application endpoint is it? Do you have any documentation for what is the expected format of the HTTP Request?

MarcoD_Incà
Level 3

Hi Shashank,
the endpoint isnt a part of any public-facing service, this is the relevant snippet from the documentation:

37079.png
The HTTP Request should then be a GET with the Content-Type: application/json header and a json object as the body.

It's unclear why the endpoint was set up this way, but it seems we need to make it work with this format.

Thank you for the help

I see the documentation. It should have been a POST request for /api/bot/getFile. By the way are you able to call /api/bot/getRerun and get the filePath?

What response do you get if you do POST /api/bot/getFile

MarcoD_Incà
Level 3

Yes, I'm able (using Postman) to call the endpoint using the way described in the documentation.

If I try to call the endpoint using POST I recieve this response:

{
    "timestamp": "2022-06-16T10:07:52.452+00:00",
    "status": 405,
    "error": "Method Not Allowed",
    "path": "/api/bot/getRerun"
}


My question is: is there any way to configure BluePrism in order to make GET calls with a body possible?


I was looking at this documentation on Mozilla if there is a restriction to send payload in HTTP. https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET ;  It doesnt seem that there is a restriction there.  

What response do you get for below-

37080.png

MarcoD_Incà
Level 3

I get the same error:

37081.png

ewilson
Staff
Staff
The error you're running into is not an error being raised by Blue Prism, but by the underlying .NET Framework. This might boil down to having to invoke curl from the command line or using a TcpClient class which is lower level than the WebRequest class used in the Utility - HTTP VBO. 

Cheers,
Eric

Hello Marco D'Incà

Were you able to resolve this? We are running into the same and tried all possible scenarios with the API call.

Update - Setting Force Pre Authorization input para to True resolved this error for us. FYI