Package ej.hoka.http.body
Interface BodyParser<T>
-
- Type Parameters:
T- the body type.
- All Known Implementing Classes:
MultiPartBodyParser,MultipartStringsParser,ParameterParser,StringBodyParser
public interface BodyParser<T>A parser called to read the body of anHttpRequest.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TparseBody(java.io.InputStream inputStream, java.lang.String contentType)Parse the body.
-
-
-
Method Detail
-
parseBody
T parseBody(java.io.InputStream inputStream, @Nullable java.lang.String contentType) throws java.io.IOException
Parse the body.- Parameters:
inputStream- the bodyInputStream.contentType- the"content-type"header of the request.- Returns:
- the body.
- Throws:
java.io.IOException- when anIOExceptionoccurs during the parsing.
-
-