Check if outgoing Request can be created
This use case is intended to check if a LocalRequest can be created based on a given Request for a given peer.
This use case should be executed before actually attempting to create the outgoing Request, because a more precise error description is provided in the case of a faulty Request.
Parameters
- The
contentas a Request for the to be created LocalRequest. - The
peeris the address for which the LocalRequest should be created. There can only be one peer per LocalRequest. Even though thepeerparameter is optional, it is recommended to specify it whenever possible. This allows additional validation rules to execute. When sending a Request via a Message, thepeerreceiving it is always known.
On Success
- Returns a
RequestValidationResultthat indicates if the given Request is valid.
On Failure
- The
RequestValidationResultcannot be created if the Request specified ascontentis malformed.