ContentNegotiationTrait
trait ContentNegotiationTrait
Basic content negotiation.
Properties
Request | $request | ||
Response | $response |
Methods
bool
expectsType(array $mimeTypes, string|null $suffix = null)
Does the client expect the provided mime type?
bool
expectsJson()
Does the client expect JSON?
bool
expectsXml()
Does the client expect XML?
bool
respondWithType(array $mimeTypes, string|null $suffix = null)
Should we respond with the provided mime type?
bool
respondWithJson()
Should we respond with JSON?
bool
respondWithXml()
Should we respond with XML?
Details
at line 30
protected bool
expectsType(array $mimeTypes, string|null $suffix = null)
Does the client expect the provided mime type?
at line 47
protected bool
expectsJson()
Does the client expect JSON?
at line 57
protected bool
expectsXml()
Does the client expect XML?
at line 69
protected bool
respondWithType(array $mimeTypes, string|null $suffix = null)
Should we respond with the provided mime type?
at line 86
protected bool
respondWithJson()
Should we respond with JSON?
at line 96
protected bool
respondWithXml()
Should we respond with XML?