I am new to all this. Exactly what is being accomplished with this code. "PSR-7 is a set of common…