refine sample for jdk http