c# - Mobile Services: How to handle the case where your query string is too long? -


with azure mobile services offline support i'm issuing pullasync query so:

// list contains 53 emails var devicecontactemails = new list<string> { "derek@gmail.com", "sarah@gmail.com", ... }; var query = _usertable.where(x => devicecontactemails.contains(x.email)); await _usertable.pullasync(query); 

the mobile services sdk translates query url encoded request filter (this list of 60 emails used contains cut out lot of middle brevity):

https://rememberwhen.azure-mobile.net/tables/user?$filter=((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((email%20eq%20'carlin_jmecwrv_stulberg%40tfbnw.net')%20or%20(email%20eq%20'carlin_jmecwrv_stulberg%40tfbnw.net'))%20or%20(email%20eq%20'carlin_jmecwrv_stulberg%40tfbnw.net'))%20eq%20'carlin_jmecwrv_stulberg%40tfbnw.net'))%20or%20(email%20eq%20'carlin_jmecwrv_stulberg%40tfbnw.net'))&$skip=0&$top=50&__includedeleted=true&__systemproperties=__createdat%2c__version 

the problem if devicecontactemails long, service complain query string length. trying filter on many items in url problem, need filter passing items in body of request json or other way.

so guess question is: how correctly set using mobile service sdk offline support can avoid exceeding limit on query string length in url encoded request?

it looks need create custom api send list of emails body of request. i'll update answer , accept if solve it.


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -