INNER CODE UNIT · Python
_event
cisco-open/forge · fuzz/splunk_stuck_dispatcher_fuzzer.py:36
def _event(body: str, content_type: str, *, encoded: bool) -> dict[str, Any]:
if encoded:
body = base64.b64encode(body.encode('utf-8')).decode('ascii')
return {
'headers': {
'content-type': content_type,
'user-agent': 'clusterfuzzlite',
},
'body': body,
'isBase64Encoded': encoded,
'pathParameters': {'token': body[:128]},
'requestContext': {
'requestId': 'fuzz',
'routeKey': 'POST /redrive/{token}',
'http': {
'method': 'POST',
'path': '/redrive/fuzz',