docs: public void setSerializer() throws InvocationTargetException,
      IllegalArgumentException, InstantiationException, IllegalAccessException {
      if (this.hasQueryStringParam("serializer")) {
        final String qs = this.getQueryStringParam("serializer");
        Constructor<? extends HttpSerializer> ctor =
          serializer_map_query_string.get(qs);
        if (ctor == null) {
          this.serializer = new HttpJsonSerializer(this);
          throw new BadRequestException(HttpResponseStatus.BAD_REQUEST,
              "Requested serializer was not found",
              "Could not find a serializer with the name: " + qs);
        }
  
        this.serializer = ctor.newInstance(this);
        return;
      }
  
      // attempt to parse the Content-Type string. We only want the first part,
      // not the character set. And if the CT is missing, we'll use the default
      // serializer
      String content_type = request().headers().get("Content-Type");
      if (content_type == null || content_type.isEmpty()) {
        return;
      }
      if (content_type.indexOf(";") > -1) {
        content_type = content_type.substring(0, content_type.indexOf(";"));
      }
      Constructor<? extends HttpSerializer> ctor =
        serializer_map_content_type.get(content_type);
      if (ctor == null) {
        return;
      }
  
      this.serializer = ctor.newInstance(this);
    }