Using 'Accept' instead of 'Content-Type' headers #155
CalemRoelofs
started this conversation in
Ideas
Replies: 1 comment
-
Hi @CalemRoelofs this is a good suggestion, thank you! I've actually got some changes coming to HTTP headers, so I'll look into this at the same time... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As outlined in the MDN docs, the
Content-Type
header is used in HTTPPOST/PUT
requests to denote the type of the content contained in the body of the request. In contrast, theAccept
header is used specify whatContent-Type
the client wishes to receive.Reading the SurrealDB REST API documentation here I can see that
Content-Type
is being used in a place where it may be more semantic to useAccept
instead.I would like to propose either extending or modifying the headers accepted by these endpoints to use the
Accept
andContent-Type
headers as appropriate (unless of course there is a reason not to do so).Beta Was this translation helpful? Give feedback.
All reactions