private Request postRequest()

in src/main/java/com/spotify/heroic/client/HeroicClient.java [87:100]


  private <T> Request postRequest(String pathSegments, T request) {
    try {
      return baseRequest
          .newBuilder()
          .url(baseUrl.newBuilder().addPathSegments(pathSegments).build())
          .post(
              RequestBody.create(
                  MediaType.parse("application/json; charset=utf-8"),
                  mapper.writeValueAsString(request)))
          .build();
    } catch (JsonProcessingException e) {
      throw new HeroicClientException(e);
    }
  }