Class HttpResponseImpl
- java.lang.Object
-
- com.google.cloud.functions.invoker.http.HttpResponseImpl
-
- All Implemented Interfaces:
com.google.cloud.functions.HttpResponse
public class HttpResponseImpl extends Object implements com.google.cloud.functions.HttpResponse
-
-
Constructor Summary
Constructors Constructor Description HttpResponseImpl(javax.servlet.http.HttpServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendHeader(String key, String value)voidflush()Optional<String>getContentType()Map<String,List<String>>getHeaders()OutputStreamgetOutputStream()BufferedWritergetWriter()voidsetContentType(String contentType)voidsetStatusCode(int code)voidsetStatusCode(int code, String message)
-
-
-
Method Detail
-
setStatusCode
public void setStatusCode(int code)
- Specified by:
setStatusCodein interfacecom.google.cloud.functions.HttpResponse
-
setStatusCode
public void setStatusCode(int code, String message)- Specified by:
setStatusCodein interfacecom.google.cloud.functions.HttpResponse
-
setContentType
public void setContentType(String contentType)
- Specified by:
setContentTypein interfacecom.google.cloud.functions.HttpResponse
-
getContentType
public Optional<String> getContentType()
- Specified by:
getContentTypein interfacecom.google.cloud.functions.HttpResponse
-
appendHeader
public void appendHeader(String key, String value)
- Specified by:
appendHeaderin interfacecom.google.cloud.functions.HttpResponse
-
getHeaders
public Map<String,List<String>> getHeaders()
- Specified by:
getHeadersin interfacecom.google.cloud.functions.HttpResponse
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStreamin interfacecom.google.cloud.functions.HttpResponse- Throws:
IOException
-
getWriter
public BufferedWriter getWriter() throws IOException
- Specified by:
getWriterin interfacecom.google.cloud.functions.HttpResponse- Throws:
IOException
-
flush
public void flush()
-
-