This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +45
-68
lines changed
owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/methods/nonwebdav Expand file tree Collapse file tree 4 files changed +45
-68
lines changed Original file line number Diff line number Diff line change 21
21
* THE SOFTWARE.
22
22
*
23
23
*/
24
+ package com.owncloud.android.lib.common.http.methods.nonwebdav
24
25
25
- package com .owncloud .android .lib .common .http .methods .nonwebdav ;
26
-
27
- import java .io .IOException ;
28
- import java .net .URL ;
26
+ import java.io.IOException
27
+ import java.net.URL
29
28
30
29
/* *
31
30
* OkHttp delete calls wrapper
32
31
*
33
32
* @author David González Verdugo
34
33
*/
35
- public class DeleteMethod extends HttpMethod {
36
-
37
- public DeleteMethod (URL url ) {
38
- super (url );
39
- }
40
-
41
- @ Override
42
- public int onExecute () throws IOException {
34
+ class DeleteMethod (url : URL ? ) : HttpMethod(url) {
35
+ @Throws(IOException ::class )
36
+ override fun onExecute (): Int {
43
37
mRequest = mRequest.newBuilder()
44
- .delete ()
45
- .build ();
46
-
47
- return super .onExecute ();
38
+ .delete()
39
+ .build()
40
+ return super .onExecute()
48
41
}
49
- }
42
+ }
Original file line number Diff line number Diff line change 21
21
* THE SOFTWARE.
22
22
*
23
23
*/
24
+ package com.owncloud.android.lib.common.http.methods.nonwebdav
24
25
25
- package com .owncloud .android .lib .common .http .methods .nonwebdav ;
26
-
27
- import java .io .IOException ;
28
- import java .net .URL ;
26
+ import java.io.IOException
27
+ import java.net.URL
29
28
30
29
/* *
31
30
* OkHttp get calls wrapper
32
31
*
33
32
* @author David González Verdugo
34
33
*/
35
- public class GetMethod extends HttpMethod {
36
-
37
- public GetMethod (URL url ) {
38
- super (url );
39
- }
40
-
41
- @ Override
42
- public int onExecute () throws IOException {
34
+ class GetMethod (url : URL ? ) : HttpMethod(url) {
35
+ @Throws(IOException ::class )
36
+ override fun onExecute (): Int {
43
37
mRequest = mRequest.newBuilder()
44
- .get ()
45
- .build ();
46
-
47
- return super .onExecute ();
38
+ .get()
39
+ .build()
40
+ return super .onExecute()
48
41
}
49
- }
42
+ }
Original file line number Diff line number Diff line change 21
21
* THE SOFTWARE.
22
22
*
23
23
*/
24
+ package com.owncloud.android.lib.common.http.methods.nonwebdav
24
25
25
- package com .owncloud .android .lib .common .http .methods .nonwebdav ;
26
-
27
- import java .io .IOException ;
28
- import java .net .URL ;
26
+ import java.io.IOException
27
+ import java.net.URL
29
28
30
29
/* *
31
30
* OkHttp post calls wrapper
32
31
*
33
32
* @author David González Verdugo
34
33
*/
35
- public class PostMethod extends HttpMethod {
36
-
37
- public PostMethod (URL url ) {
38
- super (url );
39
- }
40
-
41
- @ Override
42
- public int onExecute () throws IOException {
34
+ class PostMethod (url : URL ? ) : HttpMethod(url) {
35
+ @Throws(IOException ::class )
36
+ override fun onExecute (): Int {
43
37
mRequest = mRequest.newBuilder()
44
- .post (mRequestBody )
45
- .build ();
46
-
47
- return super .onExecute ();
38
+ .post(mRequestBody)
39
+ .build()
40
+ return super .onExecute()
48
41
}
49
- }
42
+ }
Original file line number Diff line number Diff line change 21
21
* THE SOFTWARE.
22
22
*
23
23
*/
24
+ package com.owncloud.android.lib.common.http.methods.nonwebdav
24
25
25
- package com .owncloud .android .lib .common .http .methods .nonwebdav ;
26
+ import java.io.IOException
27
+ import java.net.URL
26
28
27
- import java .io .IOException ;
28
- import java .net .URL ;
29
-
30
- public class PutMethod extends HttpMethod {
31
-
32
- public PutMethod (URL url ) {
33
- super (url );
34
- }
35
-
36
- @ Override
37
- public int onExecute () throws IOException {
29
+ /* *
30
+ * OkHttp put calls wrapper
31
+ *
32
+ * @author David González Verdugo
33
+ */
34
+ class PutMethod (url : URL ? ) : HttpMethod(url) {
35
+ @Throws(IOException ::class )
36
+ override fun onExecute (): Int {
38
37
mRequest = mRequest.newBuilder()
39
- .put (mRequestBody )
40
- .build ();
41
-
42
- return super .onExecute ();
38
+ .put(mRequestBody)
39
+ .build()
40
+ return super .onExecute()
43
41
}
44
- }
42
+ }
You can’t perform that action at this time.
0 commit comments