/** * Returns a Query from the given parameters. */ public static Query create(Iterable<Pair<String, String>> params) { @SuppressWarnings("unchecked") final Pair<String, String>[] paramsArray = StreamSupport.stream(params.spliterator(), false).toArray(Pair[]::new); return create(paramsArray); }
/** * Converts this FormData to a RequestEntity using the given encoding. */ public RequestEntity toEntity(HttpCharset charset) { return HttpEntities.create(ContentTypes.create(MediaTypes.APPLICATION_X_WWW_FORM_URLENCODED, charset), fields.render(charset)); }
@Override public boolean isApplicable(final RequestContext context) { return getRequestHeader(context, HttpHeader.X_DITTO_DUMMY_AUTH.getName()).isPresent() || context.getRequest().getUri().query().get(HttpHeader.X_DITTO_DUMMY_AUTH.getName()).isPresent(); }
/** * Converts this FormData to a RequestEntity using the given encoding. */ public RequestEntity toEntity(HttpCharset charset) { return HttpEntities.create(ContentTypes.create(MediaTypes.APPLICATION_X_WWW_FORM_URLENCODED, charset), fields.render(charset)); }
getRequestHeader(requestContext, HttpHeader.X_DITTO_DUMMY_AUTH.getName()) .orElseGet(() -> requestContext.getRequest().getUri().query() .get(HttpHeader.X_DITTO_DUMMY_AUTH.getName()) .orElseThrow( () -> new IllegalStateException(
/** * Returns a Query from the given parameters. */ public static Query create(Iterable<Pair<String, String>> params) { @SuppressWarnings("unchecked") final Pair<String, String>[] paramsArray = StreamSupport.stream(params.spliterator(), false).toArray(Pair[]::new); return create(paramsArray); }
/** * Converts this FormData to a RequestEntity using the given encoding. */ public RequestEntity toEntity(HttpCharset charset) { return HttpEntities.create(ContentTypes.create(MediaTypes.APPLICATION_X_WWW_FORM_URLENCODED, charset), fields.render(charset)); }
/** * Returns a Query from the given parameters. */ public static Query create(Iterable<Pair<String, String>> params) { @SuppressWarnings("unchecked") final Pair<String, String>[] paramsArray = StreamSupport.stream(params.spliterator(), false).toArray(Pair[]::new); return create(paramsArray); }
/** * Converts this FormData to a RequestEntity using the given encoding. */ public RequestEntity toEntity(HttpCharset charset) { return HttpEntities.create(ContentTypes.create(MediaTypes.APPLICATION_X_WWW_FORM_URLENCODED, charset), fields.render(charset)); }
/** * Creates a FormData from the given parameters. */ public static FormData create(Iterable<Pair<String, String>> params) { return new FormData(Query.create(params)); } }
/** * Creates the FormData from the given parameters. */ public static FormData create(Pair<String, String>... params) { return new FormData(Query.create(params)); }
/** * Creates the FormData from the given parameters. */ @SafeVarargs public static FormData create(Pair<String, String>... params) { return new FormData(Query.create(params)); }
/** * Creates the FormData from the given parameters. */ public static FormData create(Map<String, String> params) { return new FormData(Query.create(params)); }
/** * Creates the FormData from the given parameters. */ @SafeVarargs public static FormData create(Pair<String, String>... params) { return new FormData(Query.create(params)); }
/** * Creates the FormData from the given parameters. */ public static FormData create(Map<String, String> params) { return new FormData(Query.create(params)); } }
/** * Creates the FormData from the given parameters. */ public static FormData create(Map<String, String> params) { return new FormData(Query.create(params)); }
/** * Creates a FormData from the given parameters. */ public static FormData create(Iterable<Pair<String, String>> params) { return new FormData(Query.create(params)); } }
/** * Creates a FormData from the given parameters. */ public static FormData create(Iterable<Pair<String, String>> params) { return new FormData(Query.create(params)); } }
/** * Creates the FormData from the given parameters. */ @SafeVarargs public static FormData create(Pair<String, String>... params) { return new FormData(Query.create(params)); }
/** * Creates the FormData from the given parameters. */ public static FormData create(Map<String, String> params) { return new FormData(Query.create(params)); }