package nakadi;

import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;

class ResourceSupport {

  static String nextEid() {
    return UUID.randomUUID().toString();
  }

  static String nextFlowId() {
    return String.format("njc-%d-%016x", System.currentTimeMillis(),
        ThreadLocalRandom.current().nextLong());
  }

  public static ResourceOptions options(String accept) {
    return new ResourceOptions()
        .header("Accept", accept)
        .header("Accept-Charset", "UTF-8")
        .header("User-Agent", NakadiClient.USER_AGENT)
        .flowId(ResourceSupport.nextFlowId());
  }
}

@@ -607,10 +607,175 @@
 ));%0A  %7D%0A
+%0A  public static ResourceOptions optionsWithJsonContent(ResourceOptions options) %7B%0A    return options.header(%22Content-Type%22, %22application/json; charset=utf8%22);%0A  %7D%0A%0A
 %7D%0A

add util method for adding content type json header