Skip to content

Commit

Permalink
remove body from get request (#306)
Browse files Browse the repository at this point in the history
* remove body

* handle voice request

* remove typo

* update version
  • Loading branch information
narayana-plivo authored Jul 7, 2023
1 parent f128549 commit 2f583f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Change Log
## [v4.51.0](https://github.com/plivo/plivo-go/tree/v4.51.0) (2023-07-07)
**Fix Intermediate GET request failure**
- GET API request body removed

## [v4.50.0](https://github.com/plivo/plivo-go/tree/v4.50.0) (2023-06-28)
**Feature - Audio Streaming**
Expand Down
4 changes: 3 additions & 1 deletion lib/rest/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,10 @@ export function Axios(config) {
}
}

if (method === 'GET' && options.data !== '') {
if (method === 'GET' && options.data !== '' && (!isVoiceReq)) {
let query = '?' + queryString.stringify(params);
options.url += query;
delete options.data
}

if (typeof config.proxy !== 'undefined') {
Expand All @@ -188,6 +189,7 @@ export function Axios(config) {
if (method === 'GET' && options.data !== '') {
let query = '?' + queryString.stringify(params);
options.url += query;
delete options.data
}
axios(options).then(response => {
const exceptionClass = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plivo",
"version": "4.50.0",
"version": "4.51.0",
"description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML",
"homepage": "https://github.com/plivo/plivo-node",
"files": [
Expand Down

0 comments on commit 2f583f0

Please sign in to comment.