当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Headers.delete方法代码示例

本文整理汇总了TypeScript中@angular/http.Headers.delete方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Headers.delete方法的具体用法?TypeScript Headers.delete怎么用?TypeScript Headers.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@angular/http.Headers的用法示例。


在下文中一共展示了Headers.delete方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: get_answer_by_id

 get_answer_by_id(id: number){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     let options = new RequestOptions({ headers: this.headers});
     return this._http.get(SystemConstants.BASE_URL + SystemConstants.urls.answer.get_update_delete + id, options).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:7,代码来源:answer.service.ts

示例2: update_answer

 update_answer(id:number, updateAnswer: any){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append('Content-Type','application/json');
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     return this._http.put(SystemConstants.BASE_URL + SystemConstants.urls.answer.get_update_delete  + id, updateAnswer, { headers: this.headers }).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:7,代码来源:answer.service.ts

示例3: get_all

 // request for folder
 get_all(){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     let options = new RequestOptions({ headers: this.headers });
     return this._http.get(SystemConstants.BASE_URL + SystemConstants.urls.question_type.insert_getall, options).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:8,代码来源:questiontype.service.ts

示例4: updatePassword

 public updatePassword(username :string, new_pass: any ){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append('Content-Type','application/json');
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     return this._http.put(SystemConstants.BASE_URL + SystemConstants.urls.user.user_pass + username, new_pass, { headers: this.headers }).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:7,代码来源:user.service.ts

示例5: insert_question

 insert_question(newFolder: any){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append('Content-Type','application/json');
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     return this._http.post(SystemConstants.BASE_URL + SystemConstants.urls.question.insert, newFolder, { headers: this.headers }).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:7,代码来源:question.service.ts

示例6: insert_survey

 insert_survey(newSurvey: any){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append('Content-Type','application/json');
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     console.log(newSurvey);
     return this._http.post(SystemConstants.BASE_URL + SystemConstants.urls.surveys.insert, newSurvey, { headers: this.headers }).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:8,代码来源:survey.service.ts

示例7: get_survey_max

 get_survey_max(user_name: string){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     let myParams = new URLSearchParams();
     myParams.append('user_name',user_name);
     let options = new RequestOptions({ headers: this.headers, params: myParams });
     return this._http.get(SystemConstants.BASE_URL + SystemConstants.urls.surveys.get_max, options).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:9,代码来源:survey.service.ts

示例8: get_answer_paper_by_survey

 // request for folder
 get_answer_paper_by_survey(survey_id: string){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     let myParams = new URLSearchParams();
     myParams.append('survey_id',survey_id);
     let options = new RequestOptions({ headers: this.headers, params: myParams });
     return this._http.get(SystemConstants.BASE_URL + SystemConstants.urls.answerpaper.get_by_survey, options).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:10,代码来源:answerpaper.service.ts

示例9: delete_choice_by_question

 delete_choice_by_question(question_id: string){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     let myParams = new URLSearchParams();
     myParams.append('question_id',question_id);
     let options = new RequestOptions({ headers: this.headers, params: myParams });
     return this._http.delete(SystemConstants.BASE_URL + SystemConstants.urls.choice.delete_by_question, options).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:9,代码来源:choice.service.ts

示例10: get_question_from_to_position

 get_question_from_to_position(page_id: string, from : string, to : string){
     this.headers.delete("Authorization");
     this.headers.delete("Content-Type");
     this.headers.append("Authorization", "JWT " + this._authen.getAccessTokenUser().access_token);
     let myParams = new URLSearchParams();
     myParams.append('page_id',page_id);
     myParams.append('position_from', from);
     myParams.append('position_to', to);
     let options = new RequestOptions({ headers: this.headers, params: myParams });
     return this._http.get(SystemConstants.BASE_URL + SystemConstants.urls.question.get_from_to, options).map(this.extractData);
 }
开发者ID:luuthi,项目名称:mysurvey,代码行数:11,代码来源:question.service.ts


注:本文中的@angular/http.Headers.delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。