Creating a Poll

This is the API definition for creating a Poll. The app needs to send a object of type PollCreationRequest as the request body and gets a list of Polls as the response on successful creation of the poll. The following code block shows the fragment from the swagger documentation:

"/polls/": "post": {        "tags": [          "Name"        ],        "summary": "Creates a Poll",        "description": "Creates a Poll\n",        "consumes": [          "application/json"        ],        "produces": [          "application/json"        ],        "parameters": [          {            "in": "body",            "name": "PollCreationRequest",            "description": "Request body description",            "required": true,            "schema": {              "$ref": "#/definitions/PollCreationRequest"            }          }        ],        "responses": {          "200": {            "description": "200 response",            "schema": { "$ref": "#/definitions/Polls" ...

Get Hands-On Serverless Applications with Kotlin 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.