All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.stormbit.vksdk.vkapi.Session.kt Maven / Gradle / Ivy

The newest version!
package com.github.stormbit.vksdk.vkapi

import net.dongliu.requests.Cookie
import net.dongliu.requests.RequestBuilder
import net.dongliu.requests.Requests

class Session {
    private val session = Requests.session()
    val cookies: List get() = session.currentCookies()

    fun get(url: String): RequestBuilder {
        return session.get(url).cookies(cookies)
    }

    fun post(url: String): RequestBuilder {
        return session.post(url).cookies(cookies)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy