Package de.gematik.bbriccs.rest
Interface RawHttpCodec
- All Known Implementing Classes:
DefaultRawHttpCodec
public interface RawHttpCodec
Interface for encoding and decoding
HttpBEntity objects to and from their raw string
representation according to the RFC standards.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault HttpBRequestdecodeRequest(byte[] rawRequest) decodeRequest(String rawRequest) default HttpBRequestdecodeRequestB64(String b64RawRequest) default HttpBResponsedecodeResponse(byte[] rawResponse) Decodes a raw HTTP response byte array into anHttpBResponseobject.decodeResponse(String rawResponse) Decodes a raw HTTP response string into anHttpBResponseobject.default HttpBResponsedecodeResponseB64(String b64RawResponse) Decodes a Base64 encoded HTTP response string into anHttpBResponseobject.static RawHttpCodecProvides the default implementation of theRawHttpCodecinterface.encode(HttpBRequest request) Encodes the givenHttpBRequestobject into its String representation according to the RFC standards.encode(HttpBResponse response) Encodes the givenHttpBResponseobject into its String representation according to the RFC standards.default StringencodeB64(HttpBRequest request) Encodes the givenHttpBRequestobject into its Base64 encoded String representationdefault StringencodeB64(HttpBResponse response) Encodes the givenHttpBResponseobject into its Base64 encoded String representation
-
Method Details
-
encode
Encodes the givenHttpBRequestobject into its String representation according to the RFC standards. This encoded HTTP request can then be used for logging purposes, transmission over HTTP/VAU or any other use case where an encoded HTTP request is needed.- Parameters:
request- theHttpBRequestobject holding the internal data of the HTTP request- Returns:
- the encoded HTTP request as a plain string representation
-
encode
Encodes the givenHttpBResponseobject into its String representation according to the RFC standards. This encoded HTTP response can then be used for logging purposes, transmission over HTTP/VAU or any other use case where an encoded HTTP response is needed.- Parameters:
response- theHttpBResponseobject holding the internal data of the HTTP response- Returns:
- the encoded HTTP response as a plain string representation
-
encodeB64
Encodes the givenHttpBRequestobject into its Base64 encoded String representation- Parameters:
request- theHttpBRequestobject holding the internal data of the HTTP request- Returns:
- the encoded HTTP request as a Base64 encoded string representation
-
encodeB64
Encodes the givenHttpBResponseobject into its Base64 encoded String representation- Parameters:
response- theHttpBResponseobject holding the internal data of the HTTP response- Returns:
- the encoded HTTP response as a Base64 encoded string representation
-
decodeResponse
Decodes a raw HTTP response string into anHttpBResponseobject.- Parameters:
rawResponse- the raw HTTP response string- Returns:
- the decoded
HttpBResponseobject
-
decodeResponse
Decodes a raw HTTP response byte array into anHttpBResponseobject.- Parameters:
rawResponse- the raw HTTP response byte array- Returns:
- the decoded
HttpBResponseobject
-
decodeResponseB64
Decodes a Base64 encoded HTTP response string into anHttpBResponseobject.- Parameters:
b64RawResponse- the Base64 encoded HTTP response string- Returns:
- the decoded
HttpBResponseobject
-
decodeRequest
-
decodeRequest
-
decodeRequestB64
-
defaultCodec
Provides the default implementation of theRawHttpCodecinterface.- Returns:
- the default
RawHttpCodecimplementation
-