David Klempfner
David Klempfner

Reputation: 9870

APIM Response Headers Different Between Azure Portal, Developer Portal and Postman

I am learning Azure API Management and am seeing different response headers between Azure Portal, Developer Portal and Postman.

I'm doing an HTTP Get on this endpoint: https://secondattempt.azure-api.net/speakers

With https://conferenceapi.azurewebsites.net/ as the web service URL.

I have compared them here:

Azure Portal:

  1. Cache-Control
  2. Pragma
  3. Transfer-Encoding
  4. Content-Type
  5. Expires
  6. Set-Cookie (not present)
  7. Date
  8. Op-Apim-Trace-Location
  9. Vary

Developer Portal:

  1. Cache-Control
  2. Pragma
  3. Transfer-Encoding
  4. Content-Type
  5. Expires
  6. Set-Cookie
  7. Date
  8. Ocp-Apim-Trace-Location
  9. Vary (not present)

Postman:

  1. Cache-Control
  2. Pragma
  3. Transfer-Encoding
  4. Content-Type
  5. Expires
  6. Set-Cookie
  7. Date
  8. Ocp-Apim-Trace-Location (not present)
  9. Vary (not present)

And here are what they actually look like in the UI:

Azure Portal: Azure Portal

Developer Portal: Developer Portal

Postman: Postman

Why are some headers present in some environments but not others?

Also, why are the headers appearing in different orders?

Upvotes: 0

Views: 1000

Answers (1)

DixitArora-MSFT
DixitArora-MSFT

Reputation: 1811

  1. For Postman (Ocp-Apim-Trace-Location not present)

    The OCP-Apim-Trace feature enables you to specify whether or not APIM should generate a trace file on blob storage.

    While doing a GET request from Postman, OCP-Apim-Trace is not enabled.

    Setting the header to 'true' within Postman, for example, will give you back an HTTP Header in the response called OCP-Apim-Trace-Location.

    This will contain the URL to your trace file, which you can open in any browser.

  2. For Postman and Developer portal (Vary not resent)

    A request is not cached. Each request for a URL is supposed to be treated as a unique and uncacheable request.

  3. For Azure Portal ( Set-Cookie not present)

    See Trace and then forward request we do see "name": "Set-Cookie", "value": "ARRAffinity

enter image description here

Upvotes: 2

Related Questions