Angular 2 https调用无法触发

时间:2017-07-25 12:42:57

标签: angular alfresco postman

我正在使用邮递员呼叫https呼叫Alfresco。它适用于授权,标题,正文和设置我将SSL certificate verification更改为off。默认情况下为on

我正在调用angular 2 http请求如下:

  form: FormData = new FormData();

  method() {
    this.form.append("filename", this.tempFileName);
    this.form.append('filedata', this.tempFileData);
    this.form.append('overwrite', 'true');

    var headersData = new Headers();
    headersData.append('Authorization', 'Basic ' + btoa(environment.alfrescoCredentials));

    this.http.post(alfrescoUrl, this.form, { headers: headersData })
    .map((res: Response) => {}).subscribe();
 } 

如何将SSL certificate verification off发送给Alfresco?我在调用https请求时遇到控制台错误

ERROR Response with status: 0 for URL: null

0 个答案:

没有答案