@@ -14,6 +14,7 @@ def list_collections(self, search='', limit=25, offset=0, order_type='ASC'):
1414 params ['orderType' ] = order_type
1515
1616 return self .client .call ('get' , path , {
17+ 'content-type' : 'application/json' ,
1718 }, params )
1819
1920 def create_collection (self , name , read , write , rules ):
@@ -27,6 +28,7 @@ def create_collection(self, name, read, write, rules):
2728 params ['rules' ] = rules
2829
2930 return self .client .call ('post' , path , {
31+ 'content-type' : 'application/json' ,
3032 }, params )
3133
3234 def get_collection (self , collection_id ):
@@ -37,6 +39,7 @@ def get_collection(self, collection_id):
3739 path .replace ('{collectionId}' , collection_id )
3840
3941 return self .client .call ('get' , path , {
42+ 'content-type' : 'application/json' ,
4043 }, params )
4144
4245 def update_collection (self , collection_id , name , readstring (4 ) "" []""
@@ -54,6 +57,7 @@ def update_collection(self, collection_id, name, readstring(4) ""[]""
5457 params ['rules' ] = rules
5558
5659 return self .client .call ('put' , path , {
60+ 'content-type' : 'application/json' ,
5761 }, params )
5862
5963 def delete_collection (self , collection_id ):
@@ -64,6 +68,7 @@ def delete_collection(self, collection_id):
6468 path .replace ('{collectionId}' , collection_id )
6569
6670 return self .client .call ('delete' , path , {
71+ 'content-type' : 'application/json' ,
6772 }, params )
6873
6974 def list_documents (self , collection_id , filtersstring (4 ) "" []""
@@ -84,6 +89,7 @@ def list_documents(self, collection_id, filtersstring(4) ""[]""
8489 params ['last' ] = last
8590
8691 return self .client .call ('get' , path , {
92+ 'content-type' : 'application/json' ,
8793 }, params )
8894
8995 def create_document (self , collection_id , data , readstring (4 ) "" []""
@@ -102,6 +108,7 @@ def create_document(self, collection_id, data, readstring(4) ""[]""
102108 params ['parentPropertyType' ] = parent_property_type
103109
104110 return self .client .call ('post' , path , {
111+ 'content-type' : 'application/json' ,
105112 }, params )
106113
107114 def get_document (self , collection_id , document_id ):
@@ -113,6 +120,7 @@ def get_document(self, collection_id, document_id):
113120 path .replace ('{documentId}' , document_id )
114121
115122 return self .client .call ('get' , path , {
123+ 'content-type' : 'application/json' ,
116124 }, params )
117125
118126 def update_document (self , collection_id , document_id , data , readstring (4 ) "" []""
@@ -129,6 +137,7 @@ def update_document(self, collection_id, document_id, data, readstring(4) ""[]""
129137 params ['write' ] = write
130138
131139 return self .client .call ('patch' , path , {
140+ 'content-type' : 'application/json' ,
132141 }, params )
133142
134143 def delete_document (self , collection_id , document_id ):
@@ -140,4 +149,5 @@ def delete_document(self, collection_id, document_id):
140149 path .replace ('{documentId}' , document_id )
141150
142151 return self .client .call ('delete' , path , {
152+ 'content-type' : 'application/json' ,
143153 }, params )
0 commit comments