Closed gutomaia closed 5 months ago
Given you have WordpressJsonWrapper instance
wp = WordpressJsonWrapper()
if your plugin receives a list value on a filter
wp.get_posts(filter={'filter_list': ['apple', 'tree']})
then your resquest must be something like
curl "GET /wp-json/wp/v2/posts?filter%5Bfilter_list%5D=apple%5B0%5D&filter%5Bfilter_list%5D%5B1%5D=tree"
what means that your query string must be
filter[filter_list]=apple[0]&filter[filter_list][1]=tree
Too old
Given you have WordpressJsonWrapper instance
wp = WordpressJsonWrapper()
if your plugin receives a list value on a filter
wp.get_posts(filter={'filter_list': ['apple', 'tree']})
then your resquest must be something like
curl "GET /wp-json/wp/v2/posts?filter%5Bfilter_list%5D=apple%5B0%5D&filter%5Bfilter_list%5D%5B1%5D=tree"
what means that your query string must be
filter[filter_list]=apple[0]&filter[filter_list][1]=tree