Questions tagged [url-parameters]

URL Parameters are parameters whose values are set dynamically in a page’s URL, and can be accessed by its template and its data sources. This makes pages incredibly dynamic, enabling a single page to power an endless number of views.

The URL points to a web page. The URL may contain a static path, such as:

http://www.myStore/womens/Clothing.jsp

As is the case with any URL, you can append dynamic parameters that are used by the page located by the URL to the URL itself. At runtime, those dynamic parameters are replaced by property values, then passed to the page. For example:

http://www.myStore/womens/Clothing.jsp?type=$itemType&name=$displayName

The type parameter is replaced with the item’s item type and the name parameter is replaced by the item’s display name.

1203 questions
18
votes
4 answers

React URI params in functional components

What would be the correct approach to reading URI parameters from a functional React component? In JavaScript, if the component is a direct child of a Switch, we could do: function MyComponent(props) { const query = props.location.search; //…
Snackoverflow
  • 5,332
  • 7
  • 39
  • 69
18
votes
1 answer

How to get a URL string parameter passed to Google Apps Script doGet(e)

Given this URL: https://script.google.com/macros/s/MacroName/dev?theArg="69.28.15.332" The important part is on the end: ?theArg="69.28.15.332" I'm trying to pass information to an Apps Script in the URL. Why won't my .gs Google Apps Script…
Alan Wells
  • 30,746
  • 15
  • 104
  • 152
18
votes
2 answers

Spring security authentication based on request parameter

The application I'm working on already has Spring Security to handle form based authentication. Now the requirement is to login a user programmatically via an external service if a token is found in one of the request parameters. In other words, if…
Bing Qiao
  • 451
  • 1
  • 5
  • 14
17
votes
5 answers

Open android native google maps app obtaining directions starting from current position

I'm trying to open google maps from my application, setting a route from the phone current position to a fixed position. I'm using this code: String uri = "https://maps.google.com/maps?saddr=&daddr=example"; Intent i = new…
chiarfe
  • 522
  • 3
  • 15
14
votes
3 answers

Boolean logic in RESTful filtering and queries

This is sort of a follow-up to someone else's question about filtering/querying a list of cars. There the recommendation for a RESTful filtering request was to put filter expressions in the query of the URI, like…
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
12
votes
2 answers

AngularJS: Read route param from within controller

How can a parameter from an URL be read within an AngularJS controller? Let's say I have an URL like http://localhost/var/:value and I want the value to be stored in a variable within the controller for the /var/:value URL. I have tried using…
ctitze
  • 691
  • 2
  • 7
  • 17
11
votes
2 answers

Get multiple URL parameters using useParams() hook

I am trying to pass multiple parameters in a url using React-Router 5.1 and the useParams hook in a Functional component. However I encounter really strange behavior. I paste the url into the client. Url: …
10
votes
1 answer

Shopify - prepopulate billing address based on query param

I am trying to prepopulate the shipping/billing address in Shopify checkout via URL query params. I've found this is easy to do with the shipping address as referenced…
Cook88
  • 707
  • 1
  • 6
  • 18
10
votes
1 answer

RewriteRule - two parameters but last parameter is optional

I cannot rewrite to include two parameters but the last parameter is optional, so for example: http://www.mywebsite.com/friends/jamie - (the forward slash should be optional too). Which should be the same as…
MacMac
  • 34,294
  • 55
  • 151
  • 222
10
votes
1 answer

Call a function from external URL

I want to call a function I wrote within my Google Apps Script. When I execute a getJSON I suppose it'll automatically run my doGet(e). My Javascript: $.getJSON(https://script.google.com/macros/s/[ID]/exec, function(data){ //code here }); Is…
Rover
  • 387
  • 4
  • 14
9
votes
2 answers

Passing a date as a URL parameter to a flask route

I want to filter some database results, for a given url with some date parameter (like this url.com?start=2018-12-12). The normal way to read a parameter is with request.args.get, accessing the value of the underlying ImmutableMultiDict, which gives…
Paul Würtz
  • 1,641
  • 3
  • 22
  • 35
9
votes
3 answers

Is it secure to put the user id as a url parameter?

I am developing a social network and I would like to know if in the profile page of a user I could put the user id stored in database as a parameter in the url or is it a bad idea in terms of security? I want the url to be bookmarkable. Should I put…
Aliuk
  • 1,249
  • 2
  • 17
  • 32
9
votes
4 answers

Getting more search results per page via URL

I've been writing a program which extracts data from web searches. To get more data, I'd ideally like to extract more results per query through a script (let's say 100 or so). My question is, is there a way to modify the URL for Google, Yahoo, or…
user1319504
  • 101
  • 1
  • 1
  • 2
8
votes
3 answers

How can I decode/recreate Google Flights Search URLs?

The Problem On Google Flights, search information is encoded in a URL parameter, presumably so users can share flight searches with each other easily. The URL format looks like…
8
votes
1 answer

Multiple query parameters with same name

I want to know how does EXPRESS parse multiple query parameters with the same name; I couldn't find any useful reference anywhere. I want to know specifically about EXPRESS, how is it going to treat this URL…
hakiki_makato
  • 189
  • 2
  • 7
1 2
3
80 81