A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/tedeh/jayson/issues/70 below:

Change forcing POST to optional GET · Issue #70 · tedeh/jayson · GitHub

Hi,

i have problem with this line:

/node_modules/jayson/lib/server/middleware.js

//  405 method not allowed if not POST
if(!utils.isMethod(req, 'POST')) return error(405, { 'allow': 'POST' });

Can u make small new version, with something like this ?

if (options.allowGet) {
    if(!utils.isMethod(req, 'POST') && !utils.isMethod(req, 'GET')) return error(405, { 'allow': 'POST or GET' });
} else {
    if(!utils.isMethod(req, 'POST')) return error(405, { 'allow': 'POST' });
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4