|
| 1 | +/* Nextcloud Android Library is available under MIT license |
| 2 | + * |
| 3 | + * @author ZetaTom |
| 4 | + * Copyright (C) 2023 Tobias Kaminsky |
| 5 | + * Copyright (C) 2023 Nextcloud GmbH |
| 6 | + * |
| 7 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 8 | + * of this software and associated documentation files (the "Software"), to deal |
| 9 | + * in the Software without restriction, including without limitation the rights |
| 10 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 11 | + * copies of the Software, and to permit persons to whom the Software is |
| 12 | + * furnished to do so, subject to the following conditions: |
| 13 | + * |
| 14 | + * The above copyright notice and this permission notice shall be included in |
| 15 | + * all copies or substantial portions of the Software. |
| 16 | + * |
| 17 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 18 | + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 19 | + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 20 | + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
| 21 | + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
| 22 | + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 23 | + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 24 | + * THE SOFTWARE. |
| 25 | + * |
| 26 | + */ |
| 27 | + |
| 28 | +package com.nextcloud.operations |
| 29 | + |
| 30 | +import com.nextcloud.common.OkHttpMethodBase |
| 31 | +import okhttp3.Request |
| 32 | + |
| 33 | +/** |
| 34 | + * HTTP HEAD method that uses OkHttp with new NextcloudClient |
| 35 | + */ |
| 36 | +class HeadMethod( |
| 37 | + uri: String, |
| 38 | + useOcsApiRequestHeader: Boolean |
| 39 | +) : OkHttpMethodBase(uri, useOcsApiRequestHeader) { |
| 40 | + override fun applyType(temp: Request.Builder) { |
| 41 | + temp.head() |
| 42 | + } |
| 43 | +} |
0 commit comments