Skip to content

whitespace between parameters in the request can not match the route template #30661

Open
@xuzhg

Description

@xuzhg

Describe the bug

Supposed I have the following action in the controller:

[HttpGet("GetProductPrices(organizationId={organizationId},partId={partId})")]
public IActionResult GetPrice(string organizationId, string partId)
{
   // ....
}

The following request works fine:

https://{{url}}/GetProductPrices(organizationId='10001',partId='100000-01')  <-- Working 

The following request can't work. (Be noted, there's a whitespace between parameters)

https://{{url}}/GetProductPrice(organizationId='10001', partId='100000-01')  <-- This does not work and gets a 404 Not Found response

I'd like to learn :

  1. GetProductPrices(organizationId={organizationId},partId={partId}) is correct pattern?
  2. A whitespace between parameters is not allowed?
  3. If I put a whitespace between route template, For example, GetProductPrices(organizationId={organizationId}, partId={partId}), we have to match the whitespace in the request URI?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-routing

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy