rest - Ideal way to identify encoding of a content in HTTP request? -
i have need develop rest-based api can accept either binary or base64 encoded content, , possibly other contents. has require encoding of file identified; otherwise assumed binary. don't want auto-guess based on contents of api.
my first inclination use content-type
base64
not appear 1 of well-known content types - makes sense since it's not type rather encoding.
reading various rfc specs, 1 think content-transfer-encoding
header appropriate place indicate whether content of request body encoded base64 or binary. however, not think appropriate because it's smtp protocols, limited 7 bits.
then there's content-encoding
or transfer-encoding
don't see base64
well-known value header because both headers have more compressing content rather indicating whether base64 encoding has been applied.
i'm inclined think using custom headers safest not breach existing specs wanted see if nice folks @ can come & definitive answer compliant rfcs.
Comments
Post a Comment