Request implements Comparable<Request<T>>, Cloneable { public int getTrafficStatsTag() { return mDefaultTrafficStatsTag; } Request(String method, String url);  Request(String method, HttpUrl url); <TT extends T> Request(String method, String url, Class<TT> responseType); <TT extends T> Request(String method, HttpUrl url, Class<TT> responseType); <TT extends T> Request(String method, HttpUrl url, Converter<NetworkResponse, TT>
            converterFromResponse); <TT extends T> Request(String method, String url, Converter<NetworkResponse, TT> converterFromResponse); final RequestQueue getRequestQueue(); Request<T> clone(); Converter<NetworkResponse, ? extends T> getConverterFromResponse(); String getMethod(); HttpUrl getUrl(); String getUrlString(); Response<T> getRawResponse(); NetworkRequest getNetworkRequest(); Request<T> setNetworkRequest(NetworkRequest networkRequest); Request<T> setRequestData(R requestData, Converter<R, NetworkRequest>
            converterToRequest); R addResponseListener(RequestListener.ResponseListener<T>
                                                                responseListener); R addMarkerListener(RequestListener.MarkerListener
                                                              markerListener); R addErrorListener(RequestListener.ErrorListener errorListener); Request<T> removeResponseListener(RequestListener.ResponseListener<T> responseListener); R removeMarkerListener(RequestListener.MarkerListener
                                                                 markerListener); R removeErrorListener(RequestListener.ErrorListener
                                                                errorListener); NoConnectionPolicy getNoConnectionPolicy(); R setNoConnectionPolicy(NoConnectionPolicy noConnectionPolicy); ConnectivityManager getConnectivityManager(); R setConnectivityManager(ConnectivityManager
                                                                   connectivityManager); boolean isLogSlowRequests(); R setLogSlowRequests(boolean logSlowRequests); R setTag(Object tag); Object getTag(); R setPriority(Priority priority); Priority getPriority(); Authenticator getServerAuthenticator(); R setServerAuthenticator(Authenticator serverAuthenticator); Authenticator getProxyAuthenticator(); R setProxyAuthenticator(Authenticator proxyAuthenticator); int getTrafficStatsTag(); R setRetryPolicy(RetryPolicy retryPolicy); RetryPolicy getRetryPolicy(); R setRedirectPolicy(RedirectPolicy redirectPolicy); RedirectPolicy getRedirectPolicy(); R addMarker(String tag, Object... args); R prepRequestQueue(RequestQueue requestQueue); synchronized R enqueue(); final int getSequence(); String getCacheKey(); R setCacheEntry(Cache.Entry entry); Cache.Entry getCacheEntry(); void cancel(); boolean isCanceled(); final Map<String, String> getHeadersMap(); final Headers getHeaders(); String getBodyContentType(); byte[] getBody(); final R setShouldCache(boolean shouldCache); final boolean shouldCache(); boolean hasHadResponseDelivered(); void deliverError(JusError error); RequestFuture<T> getFuture(); @Override int compareTo(Request<T> other); @Override String toString(); static final String EVENT_CACHE_HIT_EXPIRED; static final String EVENT_POST_ERROR; static final String EVENT_POST_RESPONSE; static final String EVENT_INTERMEDIATE_RESPONSE; static final String EVENT_CANCELED_AT_DELIVERY; static final String EVENT_DONE; static final String EVENT_NETWORK_QUEUE_TAKE; static final String EVENT_NETWORK_STACK_SEND; static final String EVENT_NETWORK_STACK_AUTH_ERROR; static final String EVENT_NETWORK_STACK_AUTH_PROXY_ERROR; static final String EVENT_NETWORK_STACK_AUTH_ERROR_RESEND; static final String EVENT_NETWORK_STACK_REDIRECT_SEND; static final String EVENT_NETWORK_STACK_REDIRECT_COMPLETE; static final String EVENT_NETWORK_STACK_COMPLETE; static final String EVENT_NETWORK_TRANSFORM_COMPLETE; static final String EVENT_NETWORK_DISCARD_CANCELED; static final String EVENT_NETWORK_RETRY; static final String EVENT_NETWORK_RETRY_FAILED; static final String EVENT_NETWORK_HTTP_COMPLETE; static final String EVENT_NOT_MODIFIED; static final String EVENT_NETWORK_PARSE_COMPLETE; static final String EVENT_NETWORK_CACHE_WRITTEN; static final String EVENT_PRE_ADD_TO_QUEUE; static final String EVENT_ADD_TO_QUEUE; static final String EVENT_CACHE_QUEUE_TAKE; static final String EVENT_CACHE_DISCARD_CANCELED; static final String EVENT_ADD_DISCARD_CANCELED; static final String EVENT_CACHE_MISS; static final String EVENT_CACHE_HIT_EXPIRED_BUT_WILL_DELIVER_IT; static final String EVENT_CACHE_HIT; static final String EVENT_CACHE_HIT_PARSED; static final String EVENT_CACHE_HIT_REFRESH_NEEDED; static final String EVENT_DELIVER_RESPONSE; static final String EVENT_DELIVER_ERROR; static final String DEFAULT_PARAMS_ENCODING; }
@Test public void urlParsing() { UrlParseRequest emptyUrl = new UrlParseRequest(""); assertEquals(0, emptyUrl.getTrafficStatsTag()); UrlParseRequest noHost = new UrlParseRequest("http: assertEquals(0, noHost.getTrafficStatsTag()); UrlParseRequest badProtocol = new UrlParseRequest("bad:http: assertEquals(0, badProtocol.getTrafficStatsTag()); UrlParseRequest goodProtocol = new UrlParseRequest("http: assertFalse(0 == goodProtocol.getTrafficStatsTag()); }