@@ -139,7 +139,7 @@ public function news(array $articles)
139
139
'articles ' => $ articles ,
140
140
);
141
141
142
- $ response = $ this ->http ->post (self ::API_FOREVER_NEWS_UPLOAD , $ params );
142
+ $ response = $ this ->http ->jsonPost (self ::API_FOREVER_NEWS_UPLOAD , $ params );
143
143
144
144
return $ response ['media_id ' ];
145
145
}
@@ -161,7 +161,7 @@ public function updateNews($mediaId, $article, $index = 0)
161
161
'articles ' => array ($ article ),
162
162
);
163
163
164
- return $ this ->http ->post (self ::API_FOREVER_NEWS_UPDATE , $ params );
164
+ return $ this ->http ->jsonPost (self ::API_FOREVER_NEWS_UPDATE , $ params );
165
165
}
166
166
167
167
/**
@@ -173,7 +173,7 @@ public function updateNews($mediaId, $article, $index = 0)
173
173
*/
174
174
public function delete ($ mediaId )
175
175
{
176
- return $ this ->http ->post (self ::API_FOREVER_DELETE , array ('media_id ' => $ mediaId ));
176
+ return $ this ->http ->jsonPost (self ::API_FOREVER_DELETE , array ('media_id ' => $ mediaId ));
177
177
}
178
178
179
179
/**
@@ -228,7 +228,7 @@ public function lists($type, $offset = 0, $count = 20)
228
228
'count ' => min (20 , $ count ),
229
229
);
230
230
231
- return $ this ->http ->post (self ::API_FOREVER_LIST , $ params );
231
+ return $ this ->http ->jsonPost (self ::API_FOREVER_LIST , $ params );
232
232
}
233
233
234
234
/**
@@ -245,7 +245,7 @@ public function download($mediaId, $filename = '')
245
245
'media_id ' => $ mediaId ,
246
246
);
247
247
248
- $ method = $ this ->forever ? 'post ' : 'get ' ;
248
+ $ method = $ this ->forever ? 'jsonPost ' : 'get ' ;
249
249
$ api = $ this ->forever ? self ::API_FOREVER_GET : self ::API_TEMPORARY_GET ;
250
250
251
251
$ contents = $ this ->http ->{$ method }($ api , $ params );
0 commit comments