@@ -236,54 +236,6 @@ public void accept(String key, Object value) {
236236 return send (requestBuilder , headers );
237237 }
238238
239- public Response patch (String url , byte [] body , StringMap headers ) throws QiniuException {
240- return patch (url , body , headers , DefaultMime );
241- }
242-
243- public Response patch (String url , String body , StringMap headers ) throws QiniuException {
244- return patch (url , StringUtils .utf8Bytes (body ), headers , DefaultMime );
245- }
246-
247- public Response patch (String url , StringMap params , StringMap headers ) throws QiniuException {
248- final FormBody .Builder f = new FormBody .Builder ();
249- params .forEach (new StringMap .Consumer () {
250- @ Override
251- public void accept (String key , Object value ) {
252- f .add (key , value .toString ());
253- }
254- });
255- return patch (url , f .build (), headers );
256- }
257-
258- public Response patch (String url , byte [] body , StringMap headers , String contentType ) throws QiniuException {
259- RequestBody rbody ;
260- if (body != null && body .length > 0 ) {
261- MediaType t = MediaType .parse (contentType );
262- rbody = RequestBody .create (t , body );
263- } else {
264- rbody = RequestBody .create (null , new byte [0 ]);
265- }
266- return patch (url , rbody , headers );
267- }
268-
269- public Response patch (String url , byte [] body , int offset , int size ,
270- StringMap headers , String contentType ) throws QiniuException {
271- RequestBody rbody ;
272- if (body != null && body .length > 0 ) {
273- MediaType t = MediaType .parse (contentType );
274- rbody = create (t , body , offset , size );
275- } else {
276- rbody = RequestBody .create (null , new byte [0 ]);
277- }
278- return patch (url , rbody , headers );
279- }
280-
281- private Response patch (String url , RequestBody body , StringMap headers ) throws QiniuException {
282- Request .Builder requestBuilder = new Request .Builder ().url (url ).patch (body );
283- return send (requestBuilder , headers );
284- }
285-
286-
287239 public Response send (final Request .Builder requestBuilder , StringMap headers ) throws QiniuException {
288240 if (headers != null ) {
289241 headers .forEach (new StringMap .Consumer () {
0 commit comments