Back to project page volley.
The source code is released under:
Apache License
If you think the Android project volley listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.android.volley.ext; /*www .j a va 2 s .c o m*/ import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class RequestInfo { public String url ; public Map<String,String> params = new HashMap<String, String>() ; public Map<String, String> headers = new HashMap<String, String>(); public RequestInfo() { } public RequestInfo(String url, Map<String, String> params) { this.url = url; this.params = params; } public String getFullUrl() { if (url != null && params != null) { StringBuilder sb = new StringBuilder(); if (!url.contains("?")) { url = url + "?"; } else { if (!url.endsWith("?")) { url = url + "&"; } } Iterator<String> iterotor = params.keySet().iterator(); while (iterotor.hasNext()) { String key = (String) iterotor.next(); if (key != null) { sb.append(key).append("=").append(params.get(key)).append("&"); } } if (sb.lastIndexOf("&") == sb.length() - 1) { sb.deleteCharAt(sb.length() - 1); } return url + sb.toString(); } return url; } }