Exemple #1
0
	public constructRequest(method: string, url: string, sessionId?: string, body?: any): Observable<any> {

		const requestURL = this.getReqURL(url)
		const requestHeaders = this.getReqHeaders(sessionId)

		return inArray(method, ['post', 'put']) ? this.httpClient[method](requestURL, body, {
			headers: new HttpHeaders(requestHeaders)
		}) :  this.httpClient[method](requestURL, {
			headers: new HttpHeaders(requestHeaders)
		})
	}