mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-15 15:02:49 +01:00
feat: Added PATCH HTTP Method to Network Utility
- Implemented PATCH method in network package for partial updates. - Ensured compatibility and ease of use alongside existing GET, POST, PUT, and DELETE methods. This addition allows for more efficient and targeted updates, improving the flexibility and performance of data synchronization and other network interactions in SyncYomi. Signed-off-by: KaiserBh <kaiserbh@proton.me>
This commit is contained in:
parent
eb5b1610d0
commit
0e3c958cfe
@ -63,6 +63,19 @@ fun PUT(
|
|||||||
.cacheControl(cache)
|
.cacheControl(cache)
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
fun PATCH(
|
||||||
|
url: String,
|
||||||
|
headers: Headers = DEFAULT_HEADERS,
|
||||||
|
body: RequestBody = DEFAULT_BODY,
|
||||||
|
cache: CacheControl = DEFAULT_CACHE_CONTROL,
|
||||||
|
): Request {
|
||||||
|
return Request.Builder()
|
||||||
|
.url(url)
|
||||||
|
.patch(body)
|
||||||
|
.headers(headers)
|
||||||
|
.cacheControl(cache)
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
|
||||||
fun DELETE(
|
fun DELETE(
|
||||||
url: String,
|
url: String,
|
||||||
|
Loading…
Reference in New Issue
Block a user