I’m using Cloud Code in VS code and along side it I’m using an extension called REST Client. What I can do in REST Client is make a request to endpoints and use parts of the response in subsequent requests using JSONPath.
What I wanted to do, since the consumerKey for developer apps in the emulator changes every time the test data is deployed, was to make a request to the developer apps endpoint and get the consumerKey before calling other test methods. The problem with this is that the response doesn’t have a content-type header so REST Client doesn’t know that it can parse it as JSON.