3.4 PSR-7 HTTP Request/Response

Description

TYPO3 CD 2020 (zweite Auflage) Quiz on 3.4 PSR-7 HTTP Request/Response, created by Pascal Bartl on 09/04/2021.
Pascal Bartl
Quiz by Pascal Bartl, updated more than 1 year ago
Pascal Bartl
Created by Pascal Bartl about 3 years ago
0
0

Resource summary

Question 1

Question
Which statements about the PSR-7 standard and the Guzzle library are correct? (2)
Answer
  • PSR-7 is the successor of PSR-2 and it describes a coding standard
  • The Guzzle library (used in the TYPO3 core) utilizes PSR-7 as the HTTP message interface
  • The TYPO3 core features a simplified wrapper (the “RequestFactory”) to access Guzzle clients
  • “cURL” needs to be installed on the system to generate valid HTTP requests according to the PSR-7 standard
  • The Guzzle library is used to generate PSR-7 conform HTML emails in TYPO3

Question 2

Question
You are using TYPO3’s RequestFactory to generate HTTP requests to a remote server. The remote server returns a redirect to another URI. What is required to access the redirect target? (1)
Answer
  • This is not possible. Only web browsers can follow redirects for security reasons
  • You have to parse the response header and manually initiate a second request to follow the redirect
  • You use TYPO3’s RedirectManager instead of the RequestFactory
  • The RequestFactory automatically follows redirects if they are enabled in the backend module SITE MANAGEMENT → Redirects
  • You configure the RequestFactory to follow redirects by passing additional options to the request() call
Show full summary Hide full summary

Similar

CHEMISTRY C1 2
x_clairey_x
Ionic Bonding
Evangeline Taylor
Of Mice and Men - Themes
Hafsa A
Psychology A1
Ellie Hughes
An Inspector Calls: Mrs Sybil Birling
Rattan Bhorjee
Physics 1A - Energy
Zaki Rizvi
Globalisation Case Studies
annie
Using GoConqr to learn Spanish
Sarah Egan
MICROSOFT WORD 2013 SKILLS FOR WORK
John O'Driscoll
Cell Physiology and General Physiology of Excitable Tissues- Physiology PMU 2nd Year
Med Student
Macbeth Quotes/Themes
Michael LEwis