code: private Context current(boolean fail) {
          Context context = Context.CONTEXT.get();
          if (context == null && fail) {
              throw new IllegalStateException("No context");
          }
          return context;
      }
docs: Convenient method to retrieve the current HTTP context.
  
  @param fail whether or no we should fail (i.e. throw an {@link java.lang.IllegalStateException}) if there are
  no HTTP context
  @return the HTTP context, {@code null} if none