Update jsonrpc2.js

This commit is contained in:
Namhyeon Go 2024-11-24 02:20:44 +09:00
parent b45a7cdd6c
commit b5bc2bd851

View File

@ -2,8 +2,6 @@
// JSON-RPC 2.0 wrapper for WelsonJS framework
// Namhyeon Go <abuse@catswords.net>
// https://github.com/gnh1201/welsonjs
var HTTP = require("lib/http");
function JsonRpc2(url) {
this.url = url;
this.userAgent = "php-httpproxy/0.1.5 (Client; WelsonJS; abuse@catswords.net)";
@ -14,7 +12,7 @@ function JsonRpc2(url) {
this.invoke = function(method, params, id) {
var result;
var response = HTTP.create("MSXML")
var response = require("lib/http").create("MSXML")
.setContentType("application/json")
.setDataType("json")
.setUserAgent(this.userAgent)