I want to pass user info to Client API request headers while calling an API from UI (ReactJs) application as below:
x-Userinfo: { email: 'abc@xyz.com', userId: '12345', phone: '+1-234-567-89' }
Is above header a standard way to use ?
As per Mozilla docs as below: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
The 'X-' prefix headers are deprecated in 2012 as per IETF RFC spec https://tools.ietf.org/html/rfc6648
Custom proprietary headers have historically been used with an X- prefix, but this convention was deprecated in June 2012 because of the inconveniences it caused when nonstandard fields became standard in RFC 6648; others are listed in an IANA registry, whose original content was defined in RFC 4229. IANA also maintains a registry of proposed new HTTP headers.
If 'X-' is deprecated, what is a standard header to be used to pass user info ?
Aucun commentaire:
Enregistrer un commentaire