Skip to content

Commit b8f551b

Browse files
committed
Changed hlr request method from GET to POST
1 parent 2aee542 commit b8f551b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Fixed
66

77
- Bug with converting message's `date_sent` to `Date`
8+
- Changed hlr request method from GET to POST.
89

910
## [2.0.7](https://github.com/smsapi/smsapi-javascript-client/compare/v2.0.6...v2.0.7) - 2023-07-17
1011

src/modules/hlr/index.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('HLR', () => {
2121
};
2222

2323
const req = nock(API_URL)
24-
.get('/hlr.do')
24+
.post('/hlr.do')
2525
.query({
2626
format: 'json',
2727
number: someNumber,
@@ -48,7 +48,7 @@ describe('HLR', () => {
4848
};
4949

5050
const req = nock(API_URL)
51-
.get('/hlr.do')
51+
.post('/hlr.do')
5252
.query({
5353
format: 'json',
5454
idx: someIdx,
@@ -75,7 +75,7 @@ describe('HLR', () => {
7575
}));
7676

7777
const req = nock(API_URL)
78-
.get('/hlr.do')
78+
.post('/hlr.do')
7979
.query({
8080
format: 'json',
8181
number: someNumbers.join(','),
@@ -102,7 +102,7 @@ describe('HLR', () => {
102102
}));
103103

104104
const req = nock(API_URL)
105-
.get('/hlr.do')
105+
.post('/hlr.do')
106106
.query({
107107
format: 'json',
108108
idx: someIdx.join(','),
@@ -122,7 +122,7 @@ describe('HLR', () => {
122122
// given
123123
const someNumber = '48500';
124124
const req = nock(API_URL)
125-
.get('/hlr.do')
125+
.post('/hlr.do')
126126
.query({
127127
format: 'json',
128128
number: someNumber,
@@ -156,7 +156,7 @@ describe('HLR', () => {
156156
};
157157

158158
const req = nock(API_URL)
159-
.get('/hlr.do')
159+
.post('/hlr.do')
160160
.query({
161161
format: 'json',
162162
number: someNumbers.join(','),

src/modules/hlr/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ export class Hlr extends BaseModule {
1717
params.idx = isArray(idx) ? idx.join(',') : idx;
1818
}
1919

20-
return await this.httpClient.get<
20+
return await this.httpClient.post<
2121
HlrCheckResponse | HlrCheckResponse[],
2222
HlrCheckResponse | HlrCheckResponse[]
23-
>('/hlr.do', {
23+
>('/hlr.do', undefined, {
2424
params: {
2525
format: 'json',
2626
...params,

0 commit comments

Comments
 (0)