/** * Create a new {@link TcpRawHttpClient} using the given options, which can give a custom * socketProvider and onClose callback. * <p> * If no options are given, {@link DefaultOptions} is used. * * @param options configuration for this client */ public TcpRawHttpClient(@Nullable TcpRawHttpClientOptions options) { this(options == null ? new DefaultOptions() : options, new RawHttp(RawHttpOptions.newBuilder() .doNotAllowNewLineWithoutReturn() .build())); }
/** * Create a new {@link TcpRawHttpClient} using the given options, which can give a custom * socketProvider and onClose callback. * <p> * If no options are given, {@link DefaultOptions} is used. * * @param options configuration for this client */ public TcpRawHttpClient(@Nullable TcpRawHttpClientOptions options) { this(options == null ? new DefaultOptions() : options, new RawHttp(RawHttpOptions.newBuilder() .doNotAllowNewLineWithoutReturn() .build())); }
/** * @return an instance of {@link RawHttpOptions} that is as strict as the HTTP specification. It will not, * for example, allow LF without a CR character, or insert a Host header in a request when it's missing. */ public static RawHttpOptions strict() { return RawHttpOptions.newBuilder() .doNotAllowNewLineWithoutReturn() .doNotInsertHostHeaderIfMissing() .build(); }
/** * @return an instance of {@link RawHttpOptions} that is as strict as the HTTP specification. It will not, * for example, allow LF without a CR character, or insert a Host header in a request when it's missing. */ public static RawHttpOptions strict() { return RawHttpOptions.newBuilder() .doNotAllowNewLineWithoutReturn() .doNotInsertHostHeaderIfMissing() .build(); }