Package org.takes.rq.form
Class RqFormFake
- java.lang.Object
-
- org.takes.rq.form.RqFormFake
-
-
Constructor Summary
Constructors Constructor Description RqFormFake(Request req, String... params)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
body()
Body.Iterable<String>
head()
All lines above the body.Iterable<String>
names()
Get all parameter names.Iterable<String>
param(CharSequence name)
Get single parameter.
-
-
-
Method Detail
-
param
public Iterable<String> param(CharSequence name) throws IOException
Description copied from interface:RqForm
Get single parameter.- Specified by:
param
in interfaceRqForm
- Parameters:
name
- Parameter name- Returns:
- List of values (can be empty)
- Throws:
IOException
- if something fails reading parameters
-
names
public Iterable<String> names() throws IOException
Description copied from interface:RqForm
Get all parameter names.- Specified by:
names
in interfaceRqForm
- Returns:
- All names
- Throws:
IOException
- if something fails reading parameters
-
head
public Iterable<String> head() throws IOException
Description copied from interface:Head
All lines above the body.- Specified by:
head
in interfaceHead
- Returns:
- List of lines
- Throws:
IOException
- If something goes wrong
-
body
public InputStream body() throws IOException
Description copied from interface:Body
Body.- Specified by:
body
in interfaceBody
- Returns:
- Stream with body
- Throws:
IOException
- If something goes wrong
-
-