Bug description
We have a REST endpoint to update a datastructure that requires the use of the HTTP PUT method.
We're using request from the Context class to send a request to that endpoint.
On binding.py#L876, the _encode method is called, whose result is used to overwrite the original body parameter of the method. This causes the request-body to be url-encoded and url-formatted.
Steps to reproduce the behavior:
Send a HTTP PUT request with a JSON body to an endpoint, using the request method of the Context class.
Expected behavior
The request method correctly escapes a JSON body, or provides instructions on how to call it to prevent the URL-encoding.
Logs or Screenshots
Currently, our REST endpoint receives a payload similar to this:
Bug description We have a REST endpoint to update a datastructure that requires the use of the HTTP PUT method. We're using
request
from theContext
class to send a request to that endpoint. On binding.py#L876, the_encode
method is called, whose result is used to overwrite the originalbody
parameter of the method. This causes the request-body to be url-encoded and url-formatted.Steps to reproduce the behavior:
Send a HTTP PUT request with a JSON body to an endpoint, using the
request
method of theContext
class.Expected behavior
The
request
method correctly escapes a JSON body, or provides instructions on how to call it to prevent the URL-encoding.Logs or Screenshots
Currently, our REST endpoint receives a payload similar to this:
which does not decode to a valid JSON structure:
Splunk:
SDK: