public Map getParts()

in invoker/core/src/main/java/com/google/cloud/functions/invoker/http/HttpRequestImpl.java [78:90]


  public Map<String, HttpPart> getParts() {
    String contentType = request.getContentType();
    if (contentType == null || !request.getContentType().startsWith("multipart/form-data")) {
      throw new IllegalStateException("Content-Type must be multipart/form-data: " + contentType);
    }
    try {
      return request.getParts().stream().collect(toMap(Part::getName, HttpPartImpl::new));
    } catch (IOException e) {
      throw new UncheckedIOException(e);
    } catch (ServletException e) {
      throw new RuntimeException(e.getMessage(), e);
    }
  }