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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -