HTTP Request Method and URL
Overview
The URL panel in Martini's HTTP Request Editor is where you define the target of every HTTP request: the HTTP method and the full URL. It includes a dedicated Parameters tab for managing query and path parameters without manually editing the URL string; the URL field and the parameter table remain automatically in sync.
What You Will Learn
- How to select an HTTP method and enter a target URL
- How to add, exclude, and remove query parameters from the Parameters tab
- How to define path parameters in the URL using
{parameterName}syntax - How to use variables in the URL field and Parameters tab
When To Use This
Use this when you need to:
- Point a request at a specific endpoint using a complete URL
- Add or temporarily disable query parameters without rewriting the URL string
- Define dynamic URL path segments that are parameterized at runtime
- Substitute stored variable values into the URL or parameters at request time
Prerequisites
- Martini Designer installed and running
- At least one HTTP request created and opened in the HTTP Request Editor
HTTP Method and URL Configuration
Every HTTP request requires two things before it can be sent: an HTTP method and a target URL. These are configured at the top of the HTTP Request Editor and are the first fields you fill in when setting up a new request.
Setting the HTTP Method
The HTTP method defines the action the request performs on the target resource. Use the dropdown to the left of the URL field to select the method that matches the operation you want to perform.
Supported methods:
| Method | Purpose |
|---|---|
GET |
Retrieve a resource |
HEAD |
Retrieve response headers only, without a body |
POST |
Submit data to create or process a resource |
PUT |
Replace a resource with the provided data |
PATCH |
Partially update an existing resource |
DELETE |
Remove a resource |
OPTIONS |
Describe the communication options available for the target resource |
TRACE |
Perform a message loop-back test |
Entering the Target URL
The target URL identifies where Martini sends the request. Enter the full target URL in the text field next to the HTTP method dropdown.
URLs follow this standard structure:
1 2 3 4 5 | |
URL Key Terms
| Term | Definition |
|---|---|
| Scheme | The protocol prefix (http or https) that determines how the connection is made |
| Authority | The combination of optional user info, host, and port that identifies the server |
| Path | The slash-separated route to the target resource on the server |
| Query | Key-value pairs appended after ? that filter or customize the response |
URL Parameters
The Parameters tab manages both query parameters and path parameters for a request. Martini automatically populates this tab when you type parameters directly into the URL field, and you can also add or modify them here without editing the URL string directly.
Managing Query Parameters
Query parameters appear after the ? in a URL as key-value pairs — for example, ?tag=networking&order=newest.
You can manage query parameters in two ways:
- By editing the URL field directly
- By adding or removing entries in the Parameters tab
Changes made in either place are automatically reflected in the other, keeping both views in sync.
Adding Query Parameters
To add a query parameter using the Parameters tab:
- Open the Parameters tab in the HTTP Request Editor.
- Click the Add button in the Parameters toolbar, or press + .
- Fill in the following fields:
- Name - The query parameter key
- Value - The value assigned to the parameter
- Description - Optional note describing the parameter's purpose
Expected result: The URL field updates to include the new query parameter.
Removing Query Parameters
To remove a query parameter using the Parameters tab:
- Open the Parameters tab in the HTTP Request Editor.
- There are two options to remove a parameter from the request:
- Delete query parameters:
- Select one or more parameters in the Parameters table.
- Click the Delete button in the Parameters toolbar, or press .
- Exclude query parameters: Uncheck the checkbox next to the parameter name to remove it from the request while keeping it in the table for future use.
- Delete query parameters:
Expected result: The URL field updates to reflect the removed or excluded query parameter(s).
Defining Path Parameters
Path parameters are variable segments embedded directly in the URL path.
Define them directly in the URL by enclosing the parameter name in curly braces {}:
1 | |
Once a path parameter is included in the URL, it appears in the Parameters tab, where you can:
- Set the Value for the request
- Add an optional Description
To remove or rename a path parameter, simply edit the URL directly.
Expected result: Changes in the URL or Parameters tab are kept in sync, ensuring the request uses the correct path values.
Using Variables in the URL and Parameters
Variables let you reference stored values by name instead of hardcoding them into a request. Martini resolves variable references when the request is sent, substituting each reference with the variable's current value. For information on how to define variables, see Managing Variables in Martini's HTTP Client.
The syntax for referencing a variable is:
1 | |
Where You Can Use Variables
Variables can be referenced in:
- The URL field — anywhere in the URL string
- The Parameters table — in the Name or Value column of any query or path parameter
Variables can also be concatenated with static text:
| Location | Example |
|---|---|
| URL field | https://[[host]]/api/users |
| Query parameter value | [[apiVersion]] |
| Query parameter value (concatenated) | v[[apiVersion]] |
| Path parameter value (in Parameters tab) | [[userId]] |
Using Variables with Path Parameters
To keep a path parameter visible and editable in the Parameters tab while still resolving it from a variable, define the parameter using {} in the URL and set its value to a variable reference in the Parameters tab:
- Define the path parameter in the URL using
{}:1https://api.example.com/users/{userId} - Open the Parameters tab.
- Set the Value of
userIdto the variable reference — for example,[[userId]].
Inline Path Variable
You can write a variable reference directly in the URL path — for example:
1 | |
[[variableName]] as a path parameter.
Troubleshooting URL Parameter Issues
| Problem | Detection | Cause | Fix |
|---|---|---|---|
| Delete button is disabled | Toolbar Delete button remains grayed out after selecting parameters | A path parameter is included in the selection | Deselect the path parameter, then delete the remaining query parameters |
| Parameters tab not in sync with URL input | Parameters tab does not reflect query parameters typed into the URL | ? is missing from the URL, so key-value pairs are not parsed as query parameters |
Check the URL field and ensure it includes ? before the first query parameter |
| Path parameter missing from Parameters tab | Path parameter defined in the URL does not appear in the Parameters tab | Parameter name is not enclosed properly in curly braces {} |
Edit the URL and wrap the parameter name in {}, for example {paramName} |
| Variable used inline as a path parameter | Path segment written as [[variableName]] does not appear in the Parameters tab |
Martini cannot parse [[variableName]] as a path parameter |
Use {paramName} in the URL and set the parameter value to [[variableName]] in the Parameters tab |
Helpful Resources
- Creating Requests - How to create and save HTTP requests in Martini Designer
- Request Body Configuration - Configure the payload sent with POST, PUT, and PATCH requests
- Request Authentication - Set up authentication schemes
- Request Headers - Add and manage HTTP headers for your requests
- Managing Variables - Define named variables and reference them across your HTTP requests
- Community Q&A: Martini Community
Have a Question? Post or search it here.