mozilla-it / bugzilla-kanbanize

Sync Automation between Kanbanize and Mozilla
0 stars 1 forks source link

Set the appropriate content type for all requests, whether JSON or form #41

Open floatingatoll opened 5 years ago

floatingatoll commented 5 years ago

One of the underlying issues leading to #40 being filed is that we do not specify the appropriate content-type as part of our requests to BMO. While they're restoring the surprise default that we uncovered, we should still make every effort — regardless of #40 or not — to ensure that we're setting the appropriate Content-Type header on our requests.

For our current BMO code, we should use:

$ua->default_header('content-type' => 'application/x-www-form-urlencoded; charset=utf-8');

And for future issue #40 BMO code, we should use:

$ua->default_header('content-type' => 'application/json');

Fixing this issue would restore service for B-K tonight, or else it'll be restored tomorrow by a server-side repair.