'How do I send Request Body in Robot Framework

How do I send Request Body in Robot Framework Post request body but it gives Issue as Client Error: “Not Acceptable for url: https://apiexample.com/demo”

*** Test Cases ***
GenerateToken
    ${headers}=  create dictionary   Content-Type=application/json
    ${body}=  create dictionary    [email protected]   password=abc123 // I can not pass this request body in Post session below
    #${body}=   get file  /Users/Documents/data.json   // This method works but **I don't want to use this file method**
    create session  mysession   ${base_Url}     headers=${headers}
    ${response}=    Post On Session    mysession   /demo  data=${body}   headers=${headers}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source