Skip to content
This repository was archived by the owner on Dec 15, 2023. It is now read-only.
This repository was archived by the owner on Dec 15, 2023. It is now read-only.

API returns 302 Found with no Location header #5

@akx

Description

@akx

This issue is for a:

  • bug report -> please search issues before submitting

Minimal steps to reproduce

I have a project adapted from the (slightly too brief) sample here and the other sample code for the API I've found. I've managed to make an authenticated request to https://management.azure.com/subscriptions/REDACTED-UUID-HERE/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId%20eq%20'MS-AZR-0003P'%20and%20Currency%20eq%20'USD'%20and%20Locale%20eq%20'en-US'%20and%20RegionInfo%20eq%20'US' and I get a 302 Found response, as apparently expected.

However there is no Location header in the response headers at all, and the response body is just 2 bytes, an empty JSON-encoded string (""). I don't know what I'm doing wrong here; the parameters seem correct enough.

I've also tried with

  • various subscriptions (pay-as-you-go, sponsored and azure pass)
  • various different OfferDurableIds
  • different currency and region infos

but I always get the same response (or a 400 error for invalid filter parameters, or the occasional 500 internal server error when the stars align wrong).

Any log messages given by the failure

See above.

Expected/desired behavior

Actual rate card response.

OS and Version?

macOS, Python 3.7, requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions