1 // Copyright 2011 Google Inc. All Rights Reserved.
3 package com
.google
.appengine
.tools
.admin
;
5 import com
.google
.common
.collect
.Multimap
;
8 import java
.io
.IOException
;
9 import java
.io
.InputStream
;
10 import java
.util
.List
;
14 * Interface for connections to the AppEngine hosting service.
17 public interface ServerConnection
{
19 String
get(String url
, Map
<String
, String
> params
) throws IOException
;
21 String
get(String url
, Multimap
<String
, String
> params
) throws IOException
;
23 String
post(String url
, File payload
, String contentType
, Map
<String
, String
> params
)
26 String
post(String url
, File payload
, String contentType
, Multimap
<String
, String
> params
)
29 String
post(String url
, File payload
, String contentType
, String
... params
) throws IOException
;
31 String
post(String url
, List
<AppVersionUpload
.FileInfo
> payload
, String
... params
)
34 String
post(String url
, String payload
, Map
<String
, String
> params
) throws IOException
;
36 String
post(String url
, String payload
, Multimap
<String
, String
> params
) throws IOException
;
38 String
post(String url
, String payload
, String
... params
) throws IOException
;
41 * Returns an input stream that reads from this open connection. If the server returned
42 * an error (404, etc), return the error stream instead.
44 * @return {@code InputStream} for the server response.
46 InputStream
postAndGetInputStream(String url
, String payload
, String
... params
)