labring / labring/laf

[bug] Unable to receive plain text data in the request body

Open
#2,032 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
7.6k
Forks
670
PR merge metrics
No merged PRs in 30d

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/labring/laf/issues?q=is%3Aissue) and found no similar issues.

### Environment

https://laf.run

### What happened

When the data in the POST request body is plain text and 'Content-Type' is set to 'text/plain; charset=utf-8', no data can be retrieved from the query, headers, or body of the cloud function.
![屏幕截图 2024-10-17 114144](https://github.com/user-attachments/assets/8e39f6cb-15cc-45ae-ac4f-2da6b40efaa9)
![屏幕截图 2024-10-17 114410](https://github.com/user-attachments/assets/51be6ec7-fac0-412a-9ee7-b4591581ab75)
![屏幕截图 2024-10-17 114442](https://github.com/user-attachments/assets/00db8756-7e12-4077-9972-3fea7e59e800)
![屏幕截图 2024-10-17 114505](https://github.com/user-attachments/assets/fa59b457-b5ac-415a-b2b7-ed2dc70cc4c2)

### How to reproduce

1、Use Postman to send a request to the cloud function, set 'Content-Type' to 'text/plain; charset=utf-8', enter plain text data in the request body, and finally send the request.
2、Check if the plain text data exists in the context of the cloud function.

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the request with Postman against a cloud function, using Content-Type text/plain; charset=utf-8 and a plain-text body. Trace how the cloud function receives request query, headers, and body data; done means the plain-text payload is available in the request context without breaking other request formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
postman, typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.