我正在扩展Angular2 Http.Request
类,以便创建我自己的Request
类。
export class AuthzCodeRequest extends Request {
private static get OAUTH2_RESPONSE_TYPE_PARAMETER():string { return "response_type"; }
private static get OAUTH2_RESPONSE_TYPE_PARAMETER_VALUE():string { return "code"; }
constructor (authz_path: string, client_id: string, client_secret: string, username: string, password: string)
{
this.createParameters();
}
private createParameters(authz_path: string, client_id: string, client_secret: string, username: string, password: string)
{
this.url = authz_path; //here
}
}
如何将参数设置为查询参数而不是标题??