Fixes error when response contains key without value.
Use case: managemandate api request with status=APPROVED yields emptymandate_text.
Use URI.encode_www_form_component instead of URI.encode.
URI.encode_www_form_component is an implementation of http://www.w3.org/TR/html5/forms.html#url-encoded-form-data which is exactly what is needed to build the body of a request with Content-Type: application/x-www-form-urlencoded.
managemandate
api request withstatus=APPROVED
yields emptymandate_text
.URI.encode_www_form_component
instead ofURI.encode
.URI.encode_www_form_component
is an implementation of http://www.w3.org/TR/html5/forms.html#url-encoded-form-data which is exactly what is needed to build the body of a request withContent-Type: application/x-www-form-urlencoded
.This also includes a fix for an error we encountered on our CI server, which is similiar to what @langalex did over at https://github.com/langalex/payone_connect/commit/c6d3b80d5b65d6e8a74a3a025942e085529f7097