Skip to content

Commit

Permalink
Merge pull request #103 from johndunne/endpoint_postbody
Browse files Browse the repository at this point in the history
POST/DELETE/PUT endpoint requests now include the dataBody via Map
  • Loading branch information
RatakondalaArun committed Jan 23, 2024
2 parents 75975b6 + bef165e commit d7ae882
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/versions/v4.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,20 @@ class V4 extends Version {
print('Making a post request to $url');
response = await dio.postUri(
url,
data: postBody,
options: Options(headers: postHeaders),
);
} else if (method == HttpMethod.delete) {
//DELETE request
response = await dio.deleteUri(
url,
data: deleteBody,
options: Options(headers: deleteHeaders),
);
} else if (method == HttpMethod.put) {
response = await dio.putUri(
url,
data: postBody,
options: Options(headers: postHeaders),
);
} else {
Expand Down

0 comments on commit d7ae882

Please sign in to comment.