@@ -21,21 +21,6 @@ class EditRequestBody extends ConsumerWidget {
21
21
final apiType = ref
22
22
.watch (selectedRequestModelProvider.select ((value) => value? .apiType));
23
23
24
- // TODO: #178 GET->POST Currently switches to POST everytime user edits body even if the user intentionally chooses GET
25
- // final sm = ScaffoldMessenger.of(context);
26
- // void changeToPostMethod() {
27
- // if (requestModel?.httpRequestModel!.method == HTTPVerb.get) {
28
- // ref
29
- // .read(collectionStateNotifierProvider.notifier)
30
- // .update(selectedId, method: HTTPVerb.post);
31
- // sm.hideCurrentSnackBar();
32
- // sm.showSnackBar(getSnackBar(
33
- // "Switched to POST method",
34
- // small: false,
35
- // ));
36
- // }
37
- // }
38
-
39
24
return Column (
40
25
children: [
41
26
(apiType == APIType .rest)
@@ -55,12 +40,8 @@ class EditRequestBody extends ConsumerWidget {
55
40
switch (apiType) {
56
41
APIType .rest => Expanded (
57
42
child: switch (contentType) {
58
- ContentType .formdata => const Padding (
59
- padding: kPh4,
60
- child: FormDataWidget (
61
- // TODO: See changeToPostMethod above
62
- // changeMethodToPost: changeToPostMethod,
63
- )),
43
+ ContentType .formdata =>
44
+ const Padding (padding: kPh4, child: FormDataWidget ()),
64
45
// TODO: Fix JsonTextFieldEditor & plug it here
65
46
ContentType .json => Padding (
66
47
padding: kPt5o10,
@@ -69,7 +50,6 @@ class EditRequestBody extends ConsumerWidget {
69
50
fieldKey: "$selectedId -json-body-editor" ,
70
51
initialValue: requestModel? .httpRequestModel? .body,
71
52
onChanged: (String value) {
72
- // changeToPostMethod();
73
53
ref
74
54
.read (collectionStateNotifierProvider.notifier)
75
55
.update (body: value);
@@ -84,7 +64,6 @@ class EditRequestBody extends ConsumerWidget {
84
64
fieldKey: "$selectedId -body-editor" ,
85
65
initialValue: requestModel? .httpRequestModel? .body,
86
66
onChanged: (String value) {
87
- // changeToPostMethod();
88
67
ref
89
68
.read (collectionStateNotifierProvider.notifier)
90
69
.update (body: value);
0 commit comments