Parameters

Parameters are used to pass additional information directly within the URL, allowing for more dynamic and specific requests.

parameters
parameters-2

Core Functionalities

1. Path Parameters

These are dynamic segments of the URL path, enclosed in curly braces (e.g., {userId}). They are typically used to identify a specific resource. For example, in /users/{userId}, userId is a path parameter.

2. Query Parameters

These are optional key-value pairs appended to the end of the URL after a question mark (?). They are used for filtering, sorting, or paginating results. For example, in /products?category=electronics, category is a query parameter.

3. Automatic Code Generation

When you define query parameters, the system automatically generates a corresponding code model (like a class or struct). This saves developers from writing boilerplate code and ensures that all query options are handled in a structured, type-safe manner, reducing the risk of typos or errors.