Package org.takes.rq
Class RqHref.Smart
- java.lang.Object
-
- org.takes.rq.RqHref.Smart
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.takes.rq.RqHref
RqHref.Base, RqHref.Smart
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
body()
Body.Iterable<String>
head()
All lines above the body.Href
home()
Get self.Href
href()
Get HREF.String
single(CharSequence name)
Get param or throw HTTP exception.String
single(CharSequence name, CharSequence def)
Get param or default.
-
-
-
Method Detail
-
href
public Href href() throws IOException
Description copied from interface:RqHref
Get HREF.- Specified by:
href
in interfaceRqHref
- Returns:
- HTTP href
- Throws:
IOException
- If fails
-
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
-
home
public Href home() throws IOException
Get self.- Returns:
- Self page, full URL
- Throws:
IOException
- If fails- Since:
- 0.14
-
single
public String single(CharSequence name) throws IOException
Get param or throw HTTP exception.- Parameters:
name
- Name of query param- Returns:
- Value of it
- Throws:
IOException
- If fails
-
single
public String single(CharSequence name, CharSequence def) throws IOException
Get param or default.- Parameters:
name
- Name of query paramdef
- Default, if not found- Returns:
- Value of it
- Throws:
IOException
- If fails
-
-