1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Remove deprecated Connect api

This commit is contained in:
Nicholas O'Leary 2013-10-30 21:18:07 +00:00
parent cbc12d783c
commit 76def0a320

View File

@ -19,7 +19,9 @@ var util = require("util");
var http = require("http");
var https = require("https");
var urllib = require("url");
var bodyParser = require("express").bodyParser();
var express = require("express");
var jsonParser = express.json();
var urlencParser = express.urlencoded();
function HTTPIn(n) {
RED.nodes.createNode(this,n);
@ -33,9 +35,9 @@ function HTTPIn(n) {
if (this.method == "get") {
RED.app.get(this.url,this.callback);
} else if (this.method == "post") {
RED.app.post(this.url,bodyParser,this.callback);
RED.app.post(this.url,jsonParser,urlencParser,this.callback);
} else if (this.method == "put") {
RED.app.put(this.url,bodyParser,this.callback);
RED.app.put(this.url,jsonParser,urlencParser,this.callback);
} else if (this.method == "delete") {
RED.app.delete(this.url,this.callback);
}