• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NationalBankBelgium / stark / 9205123826

23 May 2024 08:55AM CUT coverage: 88.822%. Remained the same
9205123826

Pull #3800

github

web-flow
Merge 5208cd19f into 59c39b170
Pull Request #3800: chore(deps): bump zone.js from 0.11.8 to 0.14.6 in /showcase

1260 of 1528 branches covered (82.46%)

Branch coverage included in aggregate %.

3770 of 4135 relevant lines covered (91.17%)

193.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/packages/stark-core/src/modules/http/entities/http-parameter-codec.ts
1
import { HttpParameterCodec } from "@angular/common/http";
2

3
/**
4
 *
5
 * A custom implementation of Angular {@link https://v12.angular.io/api/common/http/HttpParameterCodec|HttpParameterCodec} to correctly
6
 * encode/decode HTTP query parameters via the {@link StarkHttpService}.
7
 *
8
 * Uses the default JavaScript method `encodeURIComponent` and `decodeURIComponent` for encoding and decoding.
9
 *
10
 * See:
11
 * - {@link https://github.com/NationalBankBelgium/stark/issues/1130}
12
 * - {@link https://github.com/angular/angular/issues/18261#issuecomment-426383787}
13
 */
14
export class StarkHttpParameterCodec implements HttpParameterCodec {
15
        /**
16
         * Encodes a key
17
         * @param key - Key to encode
18
         */
19
        public encodeKey(key: string): string {
20
                return encodeURIComponent(key);
10✔
21
        }
22

23
        /**
24
         * Encodes a value
25
         * @param value - Value to encode
26
         */
27
        public encodeValue(value: string): string {
28
                return encodeURIComponent(value);
12✔
29
        }
30

31
        /**
32
         * Decodes a key
33
         * @param key - Key to decode
34
         */
35
        public decodeKey(key: string): string {
36
                return decodeURIComponent(key);
×
37
        }
38

39
        /**
40
         * Decodes a value
41
         * @param value - Value to decode
42
         */
43
        public decodeValue(value: string): string {
44
                return decodeURIComponent(value);
×
45
        }
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc