Problem details: Hello I want to code an application in java script. The application is just used to type the name of a bitmap and its found in all the list
I started to look at the doc and I don't understand everything here is my javascript code
function osuBm() {
const url = new URL("https://osu.ppy.sh/api/v2/beatmaps/1");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
}
I launch the function in my html file by pressing a button
osu! version: Stable 20200104.8 (latest)
I started to look at the doc and I don't understand everything here is my javascript code
function osuBm() {
const url = new URL("https://osu.ppy.sh/api/v2/beatmaps/1");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
}
I launch the function in my html file by pressing a button
osu! version: Stable 20200104.8 (latest)