Satellite 6 API call fails with 'Content-Type: ' is unsupported

Solution Verified - Updated -

Issue

PUT request to the API fails and receives this message from Red Hat Satellite 6:

"error": {"message":"'Content-Type: ' is unsupported in API v2 for POST and PUT requests. Please use 'Content-Type: application/json'."}

This happens despite correctly adding "Content-Type: application/json" to the PUT request's header.

Environment

  • Red Hat Satellite 6
  • Python or other (non-shell) script issuing PUT requests to the Satellite API

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content