Constructing the request

Now, using Postman, we are going to construct a request and fire it at the Google Cloud Vision API. Click on the New option and then the Request option inside Postman.

Fill in the form shown here:

I have created a new collection named Cloud Vision API and placed this request inside that. You can import that collection into your Postman as well. This file is available in the Chapter 3\API\Postman folder. Update the new request as follows:

Field

Value

HTTP method

POST

URL

https://vision.googleapis.com/v1/images:annotate?key=API_KEY

Request body

// SNIPP SNIPP{    "requests": [    {        "image":        { "content": ...

Get Google Cloud AI Services Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.