| 700 | } |
| 701 | |
| 702 | public List<String> getBodyParamsOrder() { |
| 703 | String body; |
| 704 | try { |
| 705 | |
| 706 | body = new String(getBody(), "UTF-8"); |
| 707 | } catch (UnsupportedEncodingException e) { |
| 708 | |
| 709 | errWithStackTrace(e); |
| 710 | return null; |
| 711 | } |
| 712 | List<String> pairs = Arrays.asList(body.split("&")); |
| 713 | Set<String> usedName = new HashSet<>(); |
| 714 | List<String> names = pairs.stream().map(p -> p.split("=")[0]).collect(Collectors.toList()); |
| 715 | |
| 716 | return names.stream().filter(n -> !usedName.contains(n)).peek(usedName::add).collect(Collectors.toList()); |
| 717 | } |
| 718 | |
| 719 | public MultiValueMap<String, Parameter> getBodyParams() { |
| 720 | String body; |