Required Instance Methodvapor 4.114.1Vapor

afterDecode

Called after this Content is decoded, generally from a Request object.

Content.swift:58
mutating func afterDecode() throws

You should use this method to perform any “sanitizing” which you need on the data. For example, you may wish to replace empty strings with a nil, trim() your strings or replace empty arrays with nil. You can also use this method to abort the decoding if something isn’t valid. An empty string may indicate an error, for example.