1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package org.chromium.net;
6
7/**
8 * Callback interface.
9 */
10public interface HttpUrlRequestListener {
11    /**
12     * A callback invoked when the first chunk of the response has arrived and
13     * response headers have been read.  The listener can only call request
14     * getHeader, getContentType and getContentLength. This method will always
15     * be called before {@code onRequestComplete}.
16     */
17    void onResponseStarted(HttpUrlRequest request);
18
19    /**
20     * The listener should completely process the response in the callback
21     * method. Immediately after the callback, the request object will be
22     * recycled.
23     */
24    void onRequestComplete(HttpUrlRequest request);
25}
26