IssueRaiser

HttpParameterCodec improperly encodes special characters like '+' and '='

**I'm submitting a ...** ``` [x ] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question ``` **Current behavior** Code exemple ``` let body = new URLSearchParams(); for (let i in values) { body.set(i, values[i]); } let options = RequestOptions(); options.headers.append('Content-Type', 'application/x-www-form-urlencoded') return this.http.post(uri, body, options).then(); [...] ``` If `values[i]` has a '+' character in it, then it is replaced by spaces. **Expected/desired behavior** '+' should be sent as any other character. **Please tell us about your environment:** - **Angular version:** 2.0.0-rc.5 - **Browser:** [all | Chrome XX | Firefox XX | IE XX ] - **Language:** [Typescript]

Posted by gnujeremie on Aug 25, 2016, 8:05 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments

support (Software)

HttpParameterCodec improperly encodes special characters like '+' and '='

gnujeremieAug 25, 2016, 8:05 AM

**I'm submitting a ...** ``` [x ] bug report => search github for a similar issue or PR before submitting [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question ``` **Current behavior** Code exemple ``` let body = new URLSearchParams(); for (let i in values) { body.set(i, values[i]); } let options = RequestOptions(); options.headers.append('Content-Type', 'application/x-www-form-urlencoded') return this.http.post(uri, body, options).then(); [...] ``` If `values[i]` has a '+' character in it, then it is replaced by spaces. **Expected/desired behavior** '+' should be sent as any other character. **Please tell us about your environment:** - **Angular version:** 2.0.0-rc.5 - **Browser:** [all | Chrome XX | Firefox XX | IE XX ] - **Language:** [Typescript]

Comments (0)

No comments yet. Start the discussion.

Comment on this issue