MCPcopy Create free account
hub / github.com/EsperoTech/yaade / setQuery

Method setQuery

server/src/main/java/com/postman/collection/Url.java:201–212  ·  view source on GitHub ↗

Set the elements of the query array with a string @param rawQuery String with the query component, e.g., "foo=bar&bat=big"

(String rawQuery)

Source from the content-addressed store, hash-verified

199 * @param rawQuery String with the query component, e.g., "foo=bar&bat=big"
200 */
201 public void setQuery(String rawQuery) {
202 ArrayList<String> queryElements;
203 if (rawQuery != null && rawQuery.length() > 0) {
204 queryElements = new ArrayList<String>(Arrays.asList(rawQuery.split("&", 0)));
205
206 for (int i = 0; i < queryElements.size(); i++) {
207 this.addQuery(queryElements.get(i));
208 }
209 } else {
210 this.query = null;
211 }
212 }
213
214
215 /**

Callers 1

setRawMethod · 0.95

Calls 3

addQueryMethod · 0.95
lengthMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected