Class ExpectedBodyField
java.lang.Object
com.pixelservices.flash.components.http.expected.ExpectedBodyField
The ExpectedBodyField lets you assume the existence of a field in the request body and work with it
-
Constructor Summary
ConstructorsConstructorDescriptionExpectedBodyField
(String fieldName, RequestHandler requestHandler) Constructor for ExpectedBodyFieldExpectedBodyField
(String fieldName, String description, RequestHandler requestHandler) Constructor for ExpectedBodyField -
Method Summary
Modifier and TypeMethodDescriptionGet the field value as a BooleangetByte()
Get the field value as a Bytechar
getChar()
Get the field value as a charGet description of the fieldGet the field value as a DoubleGet the field valuegetFloat()
Get the field value as a FloatgetInt()
Get the field value as an Integerorg.json.JSONObject
Get the field value as a JSONObjectgetLong()
Get the field value as a LonggetShort()
Get the field value as a ShortGet the field value as a String
-
Constructor Details
-
ExpectedBodyField
Constructor for ExpectedBodyField- Parameters:
fieldName
- The name of the field to be retrieved from the requestrequestHandler
- The RequestHandler object
-
ExpectedBodyField
Constructor for ExpectedBodyField- Parameters:
fieldName
- The name of the field to be retrieved from the requestdescription
- The description of the fieldrequestHandler
- The RequestHandler object
-
-
Method Details
-
getFieldValue
Get the field value- Returns:
- The field value
-
getString
Get the field value as a String- Returns:
- The field value as a String
-
getInt
Get the field value as an Integer- Returns:
- The field value as an Integer
-
getBoolean
Get the field value as a Boolean- Returns:
- The field value as a Boolean
-
getLong
Get the field value as a Long- Returns:
- The field value as a Long
-
getDouble
Get the field value as a Double- Returns:
- The field value as a Double
-
getFloat
Get the field value as a Float- Returns:
- The field value as a Float
-
getByte
Get the field value as a Byte- Returns:
- The field value as a Byte
-
getShort
Get the field value as a Short- Returns:
- The field value as a Short
-
getChar
public char getChar()Get the field value as a char- Returns:
- The field value as a char
-
getJSONObject
public org.json.JSONObject getJSONObject()Get the field value as a JSONObject- Returns:
- The field value as a JSONObject
-
getDescription
Get description of the field- Returns:
- The description of the field
-