Query Parameters
Saloon Connectors and Requests can also be configured to send query parameters with the request.
Example Request
To add query parameters to your request, you can use the defaultQuery method on the connector or request. Here you can specify any query parameters that should be sent.
Modifying query parameters
During runtime, you can also overwrite or add to the request's query parameters.
Available Methods
setQuery($array)
This method lets you overwrite the default query parameters with an array of new ones.
mergeQuery($array)
This method lets you merge a new array into the existing query parameter array.
addQuery($parameterName, $parameterValue)
This method lets you add a query parameter in your code after you have instantiated the request class.
getQuery($parameterName)
This method lets you get a particular query parameter by name.
Last updated