1/*
2 * Copyright (C) 2014 Square, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package com.squareup.okhttp.mockwebserver;
17
18import java.util.List;
19
20/** An HTTP request initiated by the server. */
21public final class PushPromise {
22  private final String method;
23  private final String path;
24  private final List<String> headers;
25  private final MockResponse response;
26
27  public PushPromise(String method, String path, List<String> headers, MockResponse response) {
28    this.method = method;
29    this.path = path;
30    this.headers = headers;
31    this.response = response;
32  }
33
34  public String getMethod() {
35    return method;
36  }
37
38  public String getPath() {
39    return path;
40  }
41
42  public List<String> getHeaders() {
43    return headers;
44  }
45
46  public MockResponse getResponse() {
47    return response;
48  }
49}
50