I have a case where the datasource object is passing a blank $filter param. When using the MVC4 RC Web-api it throws an error because the filter is blank.
Here is a sample URL the datasource is calling:
http://localhost:3046/api/clients?%24inlinecount=allpages&%24format=json&%24top=50&%24filter=
What appears to be happening is that it only adds the blank filter if I clear out the search criteria (right now I just have this bound to a combo box). So when I type in something to the combo, it makes the call to the server, filters correctly. But if I clear that, it will pass a blank filter.
How can I intercept that to make sure it isn't even passing the filter?
Here is a sample URL the datasource is calling:
http://localhost:3046/api/clients?%24inlinecount=allpages&%24format=json&%24top=50&%24filter=
What appears to be happening is that it only adds the blank filter if I clear out the search criteria (right now I just have this bound to a combo box). So when I type in something to the combo, it makes the call to the server, filters correctly. But if I clear that, it will pass a blank filter.
How can I intercept that to make sure it isn't even passing the filter?