MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / getBodyParams

Method getBodyParams

src/main/java/core/packetproxy/http/Http.java:719–737  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

717 }
718
719 public MultiValueMap<String, Parameter> getBodyParams() {
720 String body;
721 try {
722
723 body = new String(getBody(), "UTF-8");
724 } catch (UnsupportedEncodingException e) {
725
726 errWithStackTrace(e);
727 return null;
728 }
729 String[] pairs = body.split("&");
730 MultiValueMap<String, Parameter> nameToParams = new MultiValueMap<>();
731 for (String param : pairs) {
732
733 Parameter p = new Parameter(param);
734 nameToParams.put(p.getName(), p);
735 }
736 return nameToParams;
737 }
738
739 public void setBodyParams(List<Parameter> params) {
740 List<String> paramStrings = params.stream().map(e -> e.toString()).collect(Collectors.toList());

Callers

nothing calls this directly

Calls 4

getBodyMethod · 0.95
getNameMethod · 0.95
errWithStackTraceMethod · 0.80
putMethod · 0.45

Tested by

no test coverage detected