Fix function name
Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
parent
1a88690da6
commit
e17b2b1809
|
@ -5,7 +5,7 @@ var spec02 = new Spec02();
|
||||||
const allowedContentTypes = [];
|
const allowedContentTypes = [];
|
||||||
allowedContentTypes.push("application/cloudevents+json; charset=utf-8");
|
allowedContentTypes.push("application/cloudevents+json; charset=utf-8");
|
||||||
|
|
||||||
function is_http_request_valid(req, res, config) {
|
function is_valid_http_request(req, res, config) {
|
||||||
var valid = true;
|
var valid = true;
|
||||||
|
|
||||||
if(req.url === config.path
|
if(req.url === config.path
|
||||||
|
@ -59,7 +59,7 @@ HTTPStructured.prototype.receive = function(){
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
self.server =
|
self.server =
|
||||||
http.createServer((request, res) => {
|
http.createServer((request, res) => {
|
||||||
if(is_http_request_valid(request, res, this.config)){
|
if(is_valid_http_request(request, res, this.config)){
|
||||||
var body = [];
|
var body = [];
|
||||||
request.on("error", err => {
|
request.on("error", err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|
Loading…
Reference in New Issue