Java Code Examples for com.ning.http.client.Request#getUrl()

The following examples show how to use com.ning.http.client.Request#getUrl() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AsyncUtil.java    From httpsig-java with The Unlicense 5 votes vote down vote up
protected static String getRequestPath(Request request) {
    try {
        URL url = new URL(request.getUrl());
        return url.getPath() + (url.getQuery() != null ? "?" + url.getQuery() : "");
    } catch (Exception e) {
        e.printStackTrace(System.err);
    }

    return null;
}
 
Example 2
Source File: NingAsyncHttpClientRequestAdaptorV1.java    From pinpoint with Apache License 2.0 4 votes vote down vote up
@Override
public String getUrl(Request request) {
    return request.getUrl();
}
 
Example 3
Source File: NingJsonFormatter.java    From parsec-libraries with Apache License 2.0 3 votes vote down vote up
private void fillNode(Request req, ObjectNode node) {

        String url = req.getUrl();
        String queryStr = req.getUri().getQuery();

        node.put("method", req.getMethod());
        node.put("uri", url);
        node.put("query", queryStr == null ? "" : queryStr);

        fillNode(req.getHeaders(), node.with("headers"));

        node.put("payload", req.getStringData());
    }