當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。