Skip to content

Commit

Permalink
GH #755 - Made request.raw_request an alias to request.text.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuch committed Nov 9, 2023
1 parent 0baa797 commit 3188aa3
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions code/zato-server/src/zato/server/service/reqresp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ def __init__(self, connection, data):
class Request:
""" Wraps a service request and adds some useful meta-data.
"""
raw_request: 'any_'
text: 'any_'

__slots__ = ('service', 'logger', 'payload', 'raw_request', 'input', 'cid', 'data_format', 'transport',
__slots__ = ('service', 'logger', 'payload', 'text', 'input', 'cid', 'data_format', 'transport',
'encrypt_func', 'encrypt_secrets', 'bytes_to_str_encoding', '_wsgi_environ', 'channel_params',
'merge_channel_params', 'http', 'amqp', 'wmq', 'ibm_mq', 'hl7', 'enforce_string_encoding')

Expand All @@ -198,7 +198,7 @@ def __init__(
self.service = service
self.logger = cast_('Logger', service.logger)
self.payload = ''
self.raw_request = ''
self.text = ''
self.input = None # type: any_
self.cid = cast_('str', None)
self.data_format = cast_('str', data_format)
Expand Down Expand Up @@ -249,6 +249,18 @@ def init(
if self.merge_channel_params:
self.input.update(self.channel_params)

# ################################################################################################################################

@property
def raw_request(self) -> 'any_':
return self.text

# ################################################################################################################################

@raw_request.setter
def raw_request(self, value:'any_') -> 'any_':
self.text = value

# ################################################################################################################################

def deepcopy(self):
Expand Down

0 comments on commit 3188aa3

Please sign in to comment.