【发布时间】:2022-08-12 05:59:51
【问题描述】:
如何在机器人框架中发送请求正文 发布请求正文,但它给出了客户端错误的问题:“URL 不可接受:https://apiexample.com/demo”
*** Test Cases ***
GenerateToken
${headers}= create dictionary Content-Type=application/json
${body}= create dictionary username=abc@example.in 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}
标签: api robotframework