Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supplement bug information #62

Conversation

codefly67
Copy link
Contributor

Add data and response data to the post request in the description, and place request and response data in the attachment

…quest in the description, and place request and response data in the attachment
let url = eventObj.flow.request.url
let method = eventObj.flow.request.method
let requestData = JSON.stringify(eventObj.flow.request.data)
if (requestData === undefined) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果eventObj.flow.request.data本身为undefined,JSON.stringify之后还会===undefined吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,仍然会===undefined,也就是在为get请求时会成立

try:
with open(str(ATTACHMENT_ROOT / full_name), 'w') as f:
json.dump(attachment_obj['eventObj'], f, indent=4)
except Exception:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是request和response放在一个附件里的意思吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,前端处理后传递过来的attachment_obj['eventObj']中仅有request和response信息

@echoyang7 echoyang7 self-requested a review December 7, 2023 08:45
@echoyang7 echoyang7 merged commit d1e3bc2 into Meituan-Dianping:master Dec 8, 2023
8 checks passed
@codefly67 codefly67 deleted the feature/supplyment-bug-information branch December 11, 2023 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants