Angular2:在Http.Request上将参数设置为查询参数

时间:2016-12-04 10:55:42

标签: angular

我正在扩展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
        }
}

如何将参数设置为查询参数而不是标题??

0 个答案:

没有答案