Closed leonpros closed 2 years ago
What keywords are you calling?
What keywords are you calling?
Tried in 2 different methods:
By using POST|GET|PUT|DELETE keywords:
Send Post Request
| [Arguments] | ${endpoint}= | ${headers}= | ${body}=null
| POST | endpoint=${endpoint} | body=${body} | headers=${headers}
And by using Set Headers keyword:
Send Post Request
| [Arguments] | ${endpoint}= | ${headers}= | ${body}=null
| Set Headers | ${headers}
| POST | endpoint=${endpoint} | body=${body}
Seems like the issue was caused by https://github.com/asyrjasalo/RESTinstance/commit/0b25bb81539fabfeb7ca8063dd337a1c39cfe233 when deepcopy
was changed to copy
. I'll fix this to Eficode fork and we'll merge it for the next release.
Seems like this is somewhat related to https://github.com/asyrjasalo/RESTinstance/issues/73. I fixed the copy
to deepcopy
, but getting the same error as I got for the fix in the comments of that issue. I'll try to see if there's a quick solution for this.
I created https://github.com/eficode/RESTinstance/pull/19 to fix this issue. Also new acceptance tests added to ensure this behaviour doesn't repeat in the future.
PR merged. This fix will be available in release 1.3.0, which we aim to do at beginning of February. Closing the issue for now.
still having this issue. there is no way to unset a certain header?
scenario: create a REST request with header "token": "Bearer ..." and "Accept": "application/json" created by "Set Headers" keyword create a new request with header "Accept": "application/json" (without "token" header) created by "Set Headers" keyword
request is still sent with the "token" header
Currently no. There is ongoing discussion about this in #130 .
When setting a header for the first time, it will not be removed for the second time i try to set new headers. i.e: create a login request that does not have access token add access token to headers try to create a new login request without access token.
expected: no access token header in request
actual: access token request exists (causes request to fail).
Does not happen on RESTinstance 1.1.0 and below