mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
Merge remote-tracking branch 'remotes/origin/master' into authorities_and_controlled_vocabularies
# Conflicts: # src/app/core/core.module.ts # src/app/shared/shared.module.ts
This commit is contained in:
@@ -17,6 +17,7 @@ import { URLCombiner } from '../url-combiner/url-combiner';
|
||||
import { TaskResponseParsingService } from '../tasks/task-response-parsing.service';
|
||||
import { ContentSourceResponseParsingService } from './content-source-response-parsing.service';
|
||||
import { MappedCollectionsReponseParsingService } from './mapped-collections-reponse-parsing.service';
|
||||
import { ProcessFilesResponseParsingService } from './process-files-response-parsing.service';
|
||||
import { TokenResponseParsingService } from '../auth/token-response-parsing.service';
|
||||
import { VocabularyEntriesResponseParsingService } from '../submission/vocabularies/vocabulary-entries-response-parsing.service';
|
||||
|
||||
@@ -31,6 +32,8 @@ export enum IdentifierType {
|
||||
export abstract class RestRequest {
|
||||
public responseMsToLive = 10 * 1000;
|
||||
public forceBypassCache = false;
|
||||
public isMultipart = false;
|
||||
|
||||
constructor(
|
||||
public uuid: string,
|
||||
public href: string,
|
||||
@@ -73,6 +76,21 @@ export class PostRequest extends RestRequest {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request representing a multipart post request
|
||||
*/
|
||||
export class MultipartPostRequest extends RestRequest {
|
||||
public isMultipart = true;
|
||||
constructor(
|
||||
public uuid: string,
|
||||
public href: string,
|
||||
public body?: any,
|
||||
public options?: HttpOptions
|
||||
) {
|
||||
super(uuid, href, RestRequestMethod.POST, body)
|
||||
}
|
||||
}
|
||||
|
||||
export class PutRequest extends RestRequest {
|
||||
constructor(
|
||||
public uuid: string,
|
||||
@@ -208,6 +226,15 @@ export class MappedCollectionsRequest extends GetRequest {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request to fetch the files of a process
|
||||
*/
|
||||
export class ProcessFilesRequest extends GetRequest {
|
||||
getResponseParser(): GenericConstructor<ResponseParsingService> {
|
||||
return ProcessFilesResponseParsingService;
|
||||
}
|
||||
}
|
||||
|
||||
export class ConfigRequest extends GetRequest {
|
||||
constructor(uuid: string, href: string, public options?: HttpOptions) {
|
||||
super(uuid, href, null, options);
|
||||
|
Reference in New Issue
Block a user