Remove HttpQuery.sendJsonArray() and .toJsonArray() as they're replaced by the
JSON class
Refactor HTTP API calls that return JSON to use the JSON class, no behaviors
are changed
Add HttpQuery.getCharset() to parse the proper encoding from the request or use the default UTF-8
Add HttpQuery.getContent() as a helper to decode the request body as a String using the given encoding
Add TestHttpQuery unit test class and quick/simple test for the query parsing methods, need to add tests for the sending methods
Add HttpQuery.getQueryPath() to fetch the path component of the requested URI
Add HttpQuery.explodePath() to fetch the path component of the requested URI
Break shared Netty mock/unit test methods into NettyMocks.java
Add tests for the HttpQuery mime private methods via reflection

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Update TestHttpQuery with refactored code and proper tests
Add api version fields to HttpQuery
Add HttpQuery.getQueryBaseRoute() to calculate what RPC module to route the
request to
Simplify HttpQuery.explodePath()

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add version to the BuildData.java file so we can print out the OpenTSDB version,
not just the git hash
Modify version RPC call to return the OpenTSDB version and use the JSON helper class for JSON formatting

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Extend BadRequestException.java with HTTP status code and details
Add HttpSerializer abstract class for serializer plugins
Add HttpJsonSerializer default implementation of HttpSerializer
Add DummyHttpSerializer.java for plugin testing
Add serializer_map_content_type and query_string hash maps for serializer
mapping
Add HttpQuery.setSerializer() to determine what serializer to use based on the
query string or content type
Add HttpQuery.InitialiizeSerializerMap() to scan the class path for serializer
implementations, should be called once per tsd
Modify the PipelineFactory constructor to initialize the serializer maps
Split out SuggestRpc into it's own file
Added "api/suggest" route
RpcHandler for HTTP requests now passes BadRequestExceptions to the serializer
Add tsd.http_show_stack_trace config option
Add method shortcut to HttpQuery since the API RPCs will need to check it
Add method checks to the api/serializers and api/suggest endpoints
Fix up TestHttpQuery with mocking required to initialize the HttpQuery object
Add TestSuggestRpc.java
Add TestHttpJsonSerializer
Fix assertEquals calls in TestHttpQuery where the expected value should appear
first
Add a number of unit tests to TestHttpQuery that now cover everything except
the HTML formatting calls

fixes

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Add "max" query parameter to SuggestRpc calls that lets users specify the number of results returned.
JAVA API remains unchanged.
closes #147

Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
Merge remote branch 'remotes/official/next' into next
Implement api/aggregators endpoint
Implement api/version endpoint
Implement api/dropcaches endpoint
Fix comments in HttpSerializer format methods
Fix error handlers in HttpSerializer where, if the user does not supply a jsonp
callback function, it was still wrapping the response in parentheses