hudson.util
Class QueryParameterMap

java.lang.Object
  extended by hudson.util.QueryParameterMap

public class QueryParameterMap
extends Object

Parses the query string of the URL into a key/value pair.

This class is even useful on the server side, as ServletRequest.getParameter(String) can try to parse into the payload (and that can cause an exception if the payload is already consumed. See HUDSON-8056.)

So if you are handling the payload yourself and only want to access the query parameters, use this class.

Since:
1.394
Author:
Kohsuke Kawaguchi

Constructor Summary
QueryParameterMap(javax.servlet.http.HttpServletRequest req)
           
QueryParameterMap(String queryString)
           
 
Method Summary
 String get(String name)
           
 List<String> getAll(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryParameterMap

public QueryParameterMap(String queryString)
Parameters:
queryString - String that looks like "abc=def&ghi=jkl"

QueryParameterMap

public QueryParameterMap(javax.servlet.http.HttpServletRequest req)
Method Detail

get

public String get(String name)

getAll

public List<String> getAll(String name)


Copyright © 2004-2013. All Rights Reserved.