debian/bullseye
|
Last change
on this file since b180b98 was 5e4cb73, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago |
|
Refactored mapservice
- mapservice is a connexion python webservice with openapi defined api
- mapservice-webclient is a angular app, consuming the openapi webservice mapservice
|
-
Property mode
set to
100644
|
|
File size:
543 bytes
|
| Rev | Line | |
|---|
| [5e4cb73] | 1 | import { HttpUrlEncodingCodec } from '@angular/common/http';
|
|---|
| 2 |
|
|---|
| 3 | /**
|
|---|
| 4 | * CustomHttpUrlEncodingCodec
|
|---|
| 5 | * Fix plus sign (+) not encoding, so sent as blank space
|
|---|
| 6 | * See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
|
|---|
| 7 | */
|
|---|
| 8 | export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
|
|---|
| 9 | encodeKey(k: string): string {
|
|---|
| 10 | k = super.encodeKey(k);
|
|---|
| 11 | return k.replace(/\+/gi, '%2B');
|
|---|
| 12 | }
|
|---|
| 13 | encodeValue(v: string): string {
|
|---|
| 14 | v = super.encodeValue(v);
|
|---|
| 15 | return v.replace(/\+/gi, '%2B');
|
|---|
| 16 | }
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.