public class ResponseFormat extends Object
Constructor and Description |
---|
ResponseFormat() |
Modifier and Type | Method and Description |
---|---|
static String |
getCsvContentDispositionValue(javax.ws.rs.core.UriInfo uriInfo)
This method will get the path segments and the interval (if it is part of the request) from the apiRequest and
create a content-disposition header value with a proposed filename in the following format.
|
public static String getCsvContentDispositionValue(javax.ws.rs.core.UriInfo uriInfo)
If the path segments are ["data", "datasource", "granularity", "dim1"] and the query params have interval {"dateTime": "a/b"}, then the result would be "attachment; filename=data-datasource-granularity-dim1_a_b.csv". For a dimension query without a "dateTime" query param and path segments ["dimensions", "datasource", "dim1"], then the result would be "attachment; filename=dimensions-datasource-dim1.csv".
uriInfo
- UriInfo of the requestCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.