本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}