Jump to content

Another Way of Expressing the Null String


iwato

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

Link to comment
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
Link to comment
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
Link to comment
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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...