Skip to content
Snippets Groups Projects

Feature/jsonpath mapping

Merged Baptiste Toulemonde requested to merge feature/jsonpath_mapping into master
Files
6
@@ -155,14 +155,14 @@ export class MappingService {
return result;
}
async postToFdpFropSmartharvester(catalogId: string, data: RequestMapping): Promise<any> {
async postToFdpFropSmartharvester(catalogId: string, data: RequestMapping, isJsonpath: boolean): Promise<any> {
if(this.fds2Token) {
const httpOptions = new Headers();
httpOptions.append('Content-Type', 'application/json');
httpOptions.append('Accept', 'application/json');
httpOptions.append('Authorization', `Bearer ${this.fds2Token}`)
let url = `${this.smartHarvesterUrl}/harvester/api/transform/publish?fdpUrl=${this.fdpUrl}&catalogId=${catalogId}`;
let url = `${this.smartHarvesterUrl}/harvester/api/transform/publish?fdpUrl=${this.fdpUrl}&catalogId=${catalogId}&isJsonpath=${isJsonpath}`;
const myInit = { method: 'POST', body: JSON.stringify(data), headers: httpOptions};
const myRequest = new Request(url, myInit);
Loading