Jump to content
iwato

Another Way of Expressing the Null String

Recommended Posts

BACKGROUND:  I would like to use the following HTTP Request query string, but substitute the empty quotes with something like null or undefined.  What are acceptable non-values in this instance?

"https://www.nudge.online/_utilities/php/matomo/index.php?module=API&action=index&method=Events.getCategory&url=www.grammarcaptive.com&idSite=1&period=year&date=today&segment=''&expanded=''&secondaryDimension=''&format=json&token_auth=363130ebb19736863e42030f91269e40";

Roddy

Share this post


Link to post
Share on other sites

Every value in a URL or form is a string, so an empty string makes sense if there's no value.  If an empty string is a valid value and you need another one, then pick another value that you want to use to represent that or maybe just remove those items from the URL altogether.

It's not common to have single quotes in a URL at all though.

  • Thanks 1

Share this post


Link to post
Share on other sites
https://www.nudge.online/_utilities/php/matomo/index.php?module=API&action=index&method=Events.getCategory&url=www.grammarcaptive.com&idSite=1&period=year&date=today&segment=&expanded=&secondaryDimension=&format=json&token_auth=363130ebb19736863e42030f91269e40

 

  • Thanks 1

Share this post


Link to post
Share on other sites

OK.  I will try both ways.  If I cannot simply drop the parameter, then I will try as davej has suggested and put nothing as the value.

Roddy

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...