switch to the js library
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m13s
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m13s
This commit is contained in:
@ -1,18 +0,0 @@
|
||||
import { API_ENDPOINT } from "@/consts";
|
||||
import axios from "axios";
|
||||
|
||||
export default class WebRequest {
|
||||
private API_ENDPOINT: string = API_ENDPOINT;
|
||||
|
||||
/**
|
||||
* Gets a response from the server
|
||||
*
|
||||
* @param endpoint the endpoint to send the request to
|
||||
* @returns the response from the server
|
||||
*/
|
||||
public static get(endpoint: string) {
|
||||
return axios.get(API_ENDPOINT + endpoint, {
|
||||
validateStatus: () => true, // Do not throw an error on non-200 status codes
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user