How do i send this Request Body in the HTTP Request activity

I am not able to format properly and send the below request body in the HTTP Request activity. It works fine in Postman app.

{
“requests”: [
{
“image”: {
“source”: {
“imageUri”: “https://ep01.epimg.net/internacional/imagenes/2016/12/29/actualidad/1483002766_821425_1483002908_noticia_normal_recorte1.jpg
}
},
“features”: [
{
“type”: “SAFE_SEARCH_DETECTION”
}
]
}
]
}

1 Like

Do you want to download the image?

1 Like

No, I am trying to use Google Vision API Safe search feature. The request body works fine when I use in postman app but not in HTTP request in UiPath. Not sure what the problem with the body format.

Can you send me the code or below details:

  1. Name of API/ URL
    OF API

  2. Parameters

  3. Outpouring expected

  4. Error you are getting

It will help me to replicate the error

@arunkumarasokan
Help is saying you need to convert the image contents in Base64 Encoding instead of passing the URL.
Can you please share the complete details if possible?

1 Like

Hi Amit, i tried that one as well but no luck. Please share your email and I will mail you the code.

amitmodi.79@gmail.com

Instead if using HTTP Request, use Package Google Vision and Safe Search Activity from there:

1 Like

https://docs.uipath.com/integrations/docs/google-vision

I know the alternative but I am looking to use the http request for the api call

Hello Arun,
In this video, I upload a file to Salesforce from UiPath Studio using Conversion ToBase64:

Thanks,
Cristian Negulescu