Skip to content

Sets some http headers to use constants

Davis Bickford requested to merge add-http-header-constants into main

Work copied from community contributor @philnichol's fork in order to rebase.

CC MR: !3874 (closed)

The following description was copied from the original MR:

What does this MR do?

This sets a few common HTTP headers to use constants to avoid spelling mistakes, as a starting point just Accept and Content-Type, if this ends up being the right direction then subsequent MRs can be raised to include more headers.

  • Accept
  • Content-Type

In this PR I've just added these to the common package, but in some cases it doesn't make it clear that these are http-related values, so not sure if we'd put this either in it's own package, or include a prefix in each header name?

Why was this MR needed?

To allow the compiler to pick up spelling mistakes.

What's the best way to test this MR?

What are the relevant issue numbers?

#29377 (closed)

Edited by Davis Bickford

Merge request reports