Merge branch 'main' of https://gitlab.com/robossembler/webservice into 14-fix/sticky-objects

This commit is contained in:
IDONTSUDO 2024-02-19 14:40:55 +03:00
commit c43c192a3e
9 changed files with 25177 additions and 8 deletions

View file

@ -17,7 +17,6 @@ export class HttpError extends Error {
export class HttpRepository {
private server = "http://localhost:4001";
public async _formDataRequest<T>(method: HttpMethod, url: string, data?: any): Promise<Result<HttpError, T>> {
let formData = new FormData();
formData.append("file", data);
@ -33,7 +32,6 @@ export class HttpRepository {
}
return Result.ok(response.text as T);
}
public async _jsonRequest<T>(method: HttpMethod, url: string, data?: any): Promise<Result<HttpError, T>> {
try {
const reqInit = {
@ -71,7 +69,6 @@ export class HttpRepository {
}
return Result.ok(response.text as T);
}
public async _jsonToClassInstanceRequest<T>(
method: HttpMethod,
url: string,