Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Handle requests without "params" #17

Closed
wants to merge 1 commit into from

1 participant

@codidex

As the 2.0 specification says, this member MAY be omitted.
(see http://www.jsonrpc.org/specification#request_object)

Grégory Wisniewski Handle requests without "params"
As the 2.0 specification says, this member MAY be omitted.
(see http://www.jsonrpc.org/specification#request_object)
9b2ecc5
@tedeh tedeh closed this in 7f602ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 20, 2013
  1. Handle requests without "params"

    Grégory Wisniewski authored
    As the 2.0 specification says, this member MAY be omitted.
    (see http://www.jsonrpc.org/specification#request_object)
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/utils.js
View
1  lib/utils.js
@@ -183,6 +183,7 @@ Utils.httpRequestWrapper = function(server) {
Utils.parseBody(req, options, function(err, request) {
// parsing failed, 500 server error
if(err) return respondError(err, 500);
+ request.params = request.params || {};
server.call(request, function(error, success) {
var response = error || success;
Something went wrong with that request. Please try again.