Skip to content

Instantly share code, notes, and snippets.

@imrankst1221
Last active November 4, 2018 09:46
Show Gist options
  • Save imrankst1221/fa7c891f25688822304c3497de470e54 to your computer and use it in GitHub Desktop.
Save imrankst1221/fa7c891f25688822304c3497de470e54 to your computer and use it in GitHub Desktop.
ApiService for post data with Authorization
interface LoginApiService {
@Headers("Content-Type: application/json")
@POST("login")
fun doLogin(
//@Query("Authorization") authorizationKey: String, // authentication header
@Body loginPostData: LoginPostData): Observable<LoginResponse> // body data
}
data class LoginPostData(
@SerializedName("UserId") var userID: String,
@SerializedName("Password") var userPassword: String
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment