testing out get calls
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
export const MODULE_ID = "rush-character-archive-foundry-module";
|
||||
|
||||
export const URI_SETTING_NAME = "uri_setting";
|
||||
export const API_KEY_NAME = "api_key";
|
||||
@@ -3,6 +3,16 @@ import { CharacterArchiver } from "./apps/CharacterArchiver.js"
|
||||
|
||||
Hooks.on('init', async function () {
|
||||
initializeSettings();
|
||||
|
||||
console.log("HERE");
|
||||
let xmlHttp = new XMLHttpRequest();
|
||||
console.log("HERE 1");
|
||||
xmlHttp.open("GET", "http://localhost:8080", false);
|
||||
console.log("HERE 2");
|
||||
xmlHttp.send(null);
|
||||
console.log("HERE 3");
|
||||
console.log(xmlHttp.responseText);
|
||||
console.log("HERE 4");
|
||||
});
|
||||
|
||||
// Add to the character sheet header bar.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {MODULE_ID, URI_SETTING_NAME} from "./common.js"
|
||||
import {MODULE_ID, URI_SETTING_NAME, API_KEY_NAME} from "./common.js"
|
||||
|
||||
export function initializeSettings() {
|
||||
game.settings.register(MODULE_ID, URI_SETTING_NAME, {
|
||||
@@ -6,7 +6,18 @@ export function initializeSettings() {
|
||||
hint: "Address of the character archive server.",
|
||||
scope: "world",
|
||||
config: true,
|
||||
restricted: true,
|
||||
default: "https://chararchive.cyberpunkrush.com",
|
||||
type: String,
|
||||
});
|
||||
|
||||
game.settings.register(MODULE_ID, API_KEY_NAME, {
|
||||
name: "API Key",
|
||||
hint: "API key to use when communicating with the archive server.",
|
||||
scope: "world",
|
||||
config: true,
|
||||
restricted: true,
|
||||
default: "",
|
||||
type: String,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user