EDDYMENS

Published a year ago

What Is A Path Parameter?

Table of contents

Definition

A path parameter is a URL structure that is used to pass data back to the server [→].

Use Cases and Examples

A path parameter allows for data to be passed in as part of the URL structure.

For example, domainname.com/page/1.

In the example above the page number is passed in after a slash and this makes it looks as if it's originally part of the URL.

A URL can have multiple path parameters. For example, domainname.com/page/1/type/freelance.

In the example above both the page number 1 and the type of content freelance were passed into the URL.

Summary

Unlike a query parameters [→], a path parameter allows for data to blend in with the URL.

This also makes it much more suitable for situations where the data that can be passed in is limited. For example, for pagination [→].

Here is another article you might like 😊 What Is A Payment Processor?