Get the response data from target server with express
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 25/100
Piste de recherche
Commencez par le point de terminaison app.post('/ChatHandler.php') et l'appel proxy.web ciblant http://localhost:8081/ChatHandler.php. Consultez la documentation de node-http-proxy sur la gestion des réponses et identifiez comment la réponse JSON relayée peut être observée avant d'atteindre le client ; le travail est considéré comme terminé lorsque l'approche documentée répond à cette question d'utilisation.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
I have a node.js application that runs with express and with http-proxy.
Now the express server is where client requests come in and then the requests are forwarded to an internal php server
I have an endpoint that forwards requets to a php file called chatHandler.php which would respond with json data back to the client.
I would like to read the json response the internal server gives.
This is how the endpoint looks
app.post('/ChatHandler.php', (req, res, next) => {
proxy.web(req, res, {
target: 'http://localhost:8081/ChatHandler.php'
}, next);
});
Before the request is returned to the client I want to see what the response from "http:localhost:8081/ChatHandler.php" was, like the body of the response where the json data is.
- Langage dominant
- JavaScript
- Étoiles
- 14.1k
- Forks
- 2k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de http-party/node-http-proxy
-
util._extend() is depracatoryOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
http-party/node-http-proxy#1719 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
http-party/node-http-proxy#1721 · 1 commentaire ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 55/100
http-party/node-http-proxy#1715 · 1 commentaire · 5 réactions ·
-
Is this library is dead?Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 15/100
http-party/node-http-proxy#1711 · 2 commentaires ·
-
HTTP3 + QUIC support?Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
http-party/node-http-proxy#1710 · 5 réactions ·
Toutes les issues de http-party/node-http-proxy
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
ImranR98/apps.obtainium.imranr.dev#2000 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
routing: the tray panel's stage stands still with motion reduced while a request is in flightOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
microsoft/monaco-editor#5577 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
obsidianmd/obsidian-help#1169 ·
Les mainteneurs répondent en général sous 2 jours
-
[docs] RELEASE.md: wrong branch name, no check that the prepare PR merged with the right subject, manual publish stepPeut-être pris @albertteoh l’a pris aujourd’hui. Ouvertedocumentation
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
jaegertracing/jaeger-ui#4739 ·
Les mainteneurs répondent en général sous 1 jour