Below error occurring on my code
${resp}= Post Request sw3 https://sw3- test.test1.com/api/v1/test1/patients
\ ... Content-Type:application/json
\ ... Authorization:authkey02 Accept=application/json
Error as follows
KEYWORD ${resp} = RequestsLibrary . Post Request sw3, https://sw3-test.test1.com/api/v1/test1/patients, Content-Type:application/json, Authorization:authkey02, Accept=application/json
Documentation:
Send a POST request on the session object found using the
Start / End / Elapsed: 20170315 12:08:21.283 / 20170315 12:08:21.285 / 00:00:00.002
12:08:21.283 TRACE Arguments: [ 'sw3' | 'https://sw3-test.test1.com/api/v1/test1/patients' | 'Content-Type:application/json' | 'Authorization:authkey02' | 'Accept=application/json' ]
12:08:21.284 FAIL AttributeError: 'unicode' object has no attribute 'copy'
This works ok if i do not use the third line of code - what gives?
You can give it a try like passing those key:value pairs as a dictionary Header variable.
&{Header}= Content-Type:application/json Authorization:authkey02
Accept=application/json
${resp} = RequestsLibrary.Post Request sw3 https://sw3-test.test1.com/api/v1/test1/patients headers=${Header}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With