27 lines
625 B
JavaScript
27 lines
625 B
JavaScript
import axios from "axios";
|
|
|
|
export default class serverRequest {
|
|
static #url = "http://localhost:8080/";
|
|
|
|
static async plus(v1 = 0, v2 = 0) {
|
|
const { data } = await axios.get(this.#url + `plus?v1=${v1}&v2=${v2}`);
|
|
return data;
|
|
}
|
|
|
|
static async minus(v1 = 0, v2 = 0) {
|
|
const { data } = await axios.get(this.#url + `minus?v1=${v1}&v2=${v2}`);
|
|
return data;
|
|
}
|
|
|
|
static async toLowerCase(str = "") {
|
|
const { data } = await axios.get(this.#url + `toLowerCase/${str}`);
|
|
return data;
|
|
}
|
|
|
|
static async toUpperCase(str = "") {
|
|
const { data } = await axios.get(this.#url + `toUpperCase/${str}`);
|
|
return data;
|
|
}
|
|
|
|
|
|
} |