本文整理汇总了TypeScript中@angular/http.URLSearchParams.append方法的典型用法代码示例。如果您正苦于以下问题:TypeScript URLSearchParams.append方法的具体用法?TypeScript URLSearchParams.append怎么用?TypeScript URLSearchParams.append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/http.URLSearchParams
的用法示例。
在下文中一共展示了URLSearchParams.append方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getPractitioner
/////////////////////////// ADMIN DATA ///////////////////////////
getPractitioner(practitionerId : UIInternalIdentifier) : Observable<UIPractitioner> {
let params = new URLSearchParams();
params.append('serviceId', practitionerId.serviceId);
params.append('practitionerId', practitionerId.resourceId);
return this.httpGet('api/recordViewer/getPractitioner', {search: params});
}
示例2: search
search(searchData : string, organisationUuid : string) : Observable<Practitioner[]> {
var params = new URLSearchParams();
params.append('searchData', searchData);
params.append('organisationUuid', organisationUuid);
return this.httpGet('api/practitioner/search', {search: params});
}
示例3: getOrganisation
getOrganisation(organisationId : UIInternalIdentifier) : Observable<UIOrganisation> {
let params = new URLSearchParams();
params.append('serviceId', organisationId.serviceId);
params.append('organisationId', organisationId.resourceId);
return this.httpGet('api/recordViewer/getOrganisation', {search: params});
}
示例4: getParams
private getParams(patientId: UIInternalIdentifier): any {
var params = new URLSearchParams();
params.append('serviceId', patientId.serviceId);
params.append('patientId', patientId.resourceId);
return {search: params};
}
示例5: getTopArtistsByTag
getTopArtistsByTag(tag: string, country: string) {
let search = new URLSearchParams();
search.append('tag', tag);
search.append('country', country);
return this.http.get(`${this.url}${this.method}`, { search })
.map((res) => res.json().topartists);
}
示例6: post
post(username: string, password: string): Observable<UserModel> {
const body = new URLSearchParams('', new PatchedQueryEncoder());
body.append('username', username);
body.append('password', password);
const options = this.httpOptions({ 'Content-Type': 'application/x-www-form-urlencoded' });
return this.http.post('/api/login', body.toString(), options)
.map(res => this.setUserFromResponse(res));
}
示例7: get_survey_by_folder
get_survey_by_folder(user_name: string, folder_id : number){
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);
myParams.append('folder_id',folder_id.toString());
let options = new RequestOptions({ headers: this.headers, params: myParams });
return this._http.get(SystemConstants.BASE_URL + SystemConstants.urls.surveys.get_by_folder, options).map(this.extractData);
}
示例8: Promise
return new Promise((resolve, reject) => {
let searchParams = new URLSearchParams();
searchParams.append('criteria', searchString);
if (includeRoles) {
searchParams.append('roles', 'all');
}
this.documentService.getByCriteria(Links.AUTH_PRINCIPALS, searchParams).then((principalsResult) => {
resolve(principalsResult);
}).catch(reject);
});
示例9: 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);
}
示例10: getTable
getTable(name: string, source: string): Observable<any> {
const url = this._baseUrl + '/data/table';
let query: URLSearchParams = new URLSearchParams();
query.append('name', name);
query.append('source', source);
console.log('Getting table values: ', name, source);
return this._http.get(url, { headers: this._headers, search: query })
.map(res => res.json());
}