MCPcopy Index your code
hub / github.com/OpenFeign/feign / queryLine

Method queryLine

core/src/main/java/feign/RequestTemplate.java:1036–1063  ·  view source on GitHub ↗

The Query String for the template. Expressions are not resolved. @return the Query String.

()

Source from the content-addressed store, hash-verified

1034 * @return the Query String.
1035 */
1036 public String queryLine() {
1037 StringBuilder queryString = new StringBuilder();
1038
1039 if (!this.queries.isEmpty()) {
1040 Iterator<QueryTemplate> iterator = this.queries.values().iterator();
1041 while (iterator.hasNext()) {
1042 QueryTemplate queryTemplate = iterator.next();
1043 String query = queryTemplate.toString();
1044 if (query != null && !query.isEmpty()) {
1045 queryString.append(query);
1046 if (iterator.hasNext()) {
1047 queryString.append("&");
1048 }
1049 }
1050 }
1051 }
1052 /* remove any trailing ampersands */
1053 String result = queryString.toString();
1054 if (result.endsWith("&")) {
1055 result = result.substring(0, result.length() - 1);
1056 }
1057
1058 if (!result.isEmpty()) {
1059 result = "?" + result;
1060 }
1061
1062 return result;
1063 }
1064
1065 private void extractQueryTemplates(String queryString, boolean append) {
1066 /* split the query string up into name value pairs */

Callers 7

encodedQueryMethod · 0.95
urlMethod · 0.95
canonicalStringMethod · 0.80
canonicalStringMethod · 0.80
canonicalStringMethod · 0.80

Calls 8

toStringMethod · 0.95
isEmptyMethod · 0.80
iteratorMethod · 0.80
nextMethod · 0.65
lengthMethod · 0.65
hasNextMethod · 0.45
appendMethod · 0.45
toStringMethod · 0.45