AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.NanoHTTPD.Response Class Reference

Public Member Functions

 Response ()
 
 Response (String status, String mimeType, InputStream data)
 
 Response (String status, String mimeType, String txt)
 
void addHeader (String name, String value)
 

Public Attributes

String status
 
String mimeType
 
InputStream data
 
Properties header = new Properties()
 

Detailed Description

HTTP response. Return one of these from serve().

Definition at line 137 of file NanoHTTPD.java.

Constructor & Destructor Documentation

◆ Response() [1/3]

com.google.appinventor.components.runtime.util.NanoHTTPD.Response.Response ( )

Default constructor: response = HTTP_OK, data = mime = 'null'

Definition at line 142 of file NanoHTTPD.java.

◆ Response() [2/3]

com.google.appinventor.components.runtime.util.NanoHTTPD.Response.Response ( String  status,
String  mimeType,
InputStream  data 
)

Basic constructor.

Definition at line 150 of file NanoHTTPD.java.

◆ Response() [3/3]

com.google.appinventor.components.runtime.util.NanoHTTPD.Response.Response ( String  status,
String  mimeType,
String  txt 
)

Convenience method that makes an InputStream out of given text.

Definition at line 161 of file NanoHTTPD.java.

Member Function Documentation

◆ addHeader()

void com.google.appinventor.components.runtime.util.NanoHTTPD.Response.addHeader ( String  name,
String  value 
)

Adds given line to the header.

Definition at line 178 of file NanoHTTPD.java.

Member Data Documentation

◆ data

InputStream com.google.appinventor.components.runtime.util.NanoHTTPD.Response.data

Data of the response, may be null.

Definition at line 196 of file NanoHTTPD.java.

◆ header

Properties com.google.appinventor.components.runtime.util.NanoHTTPD.Response.header = new Properties()

Headers for the HTTP response. Use addHeader() to add lines.

Definition at line 202 of file NanoHTTPD.java.

◆ mimeType

String com.google.appinventor.components.runtime.util.NanoHTTPD.Response.mimeType

MIME type of content, e.g. "text/html"

Definition at line 191 of file NanoHTTPD.java.

◆ status

String com.google.appinventor.components.runtime.util.NanoHTTPD.Response.status

HTTP status code after processing, e.g. "200 OK", HTTP_OK

Definition at line 186 of file NanoHTTPD.java.


The documentation for this class was generated from the following file: