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

Use JSON Headers for http GET Responses using pure Express #2

Open
LUIS9799 opened this issue Dec 6, 2022 · 1 comment
Open

Use JSON Headers for http GET Responses using pure Express #2

LUIS9799 opened this issue Dec 6, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@LUIS9799
Copy link
Member

LUIS9799 commented Dec 6, 2022

Headers JSON + Express
= GET API RESPONSE
from: https://piotech.luisweb.cf/api
HANDLED + Proxied

@LUIS9799
Copy link
Member Author

LUIS9799 commented Dec 6, 2022

(Snippet)

app.get("/user", (req, res) => {
	if (req.headers["asdd"]) {
		res.json({
			id: req.headers["asdedew"] || null,
			name: req.headers["azsdwe"] || null,
		});
	} else {
		res.json(null);
	}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 💚Done
Development

No branches or pull requests

3 participants