Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

request-api allow the http method to be specified #551

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/api/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module.exports = (send) => {
}

const request = {
method: 'GET',
path: 'block/get',
args: args,
qs: opts
Expand Down
2 changes: 1 addition & 1 deletion src/request-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function requestAPI (config, options, callback) {
// this option is only used internally, not passed to daemon
delete options.qs.followSymlinks

const method = 'POST'
const method = options.method || 'POST'
const headers = {}

if (isNode) {
Expand Down