Skip to content

HttpClient.PostAsync() send Get requests #10176

Closed
@olkuziv

Description

@olkuziv

Describe the bug

After adding [Authorize] attribute on Post method, aftert calling HttpClient.PostAsync() working like GetAsync().

To Reproduce

Steps to reproduce the behavior:

  1. Create default blazor app
  2. Add Coockies auth
  3. Add new Get endpoint
  4. Add [Authorize] attribute for new Post endpoint
  5. Call this Post endpoint
  6. In debug could see that HttpClient send Get request

Screenshots

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions