Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
Awais9 committed Oct 30, 2018
1 parent 0dd213e commit ef194d3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions app/src/main/java/com/awais/gitvolleysinglecall/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import org.json.JSONObject

class MainActivity : AppCompatActivity() {

private val testAPI: String = "Test"
val baseURL = "http://topsunapi.arhamsoft.com/api/authentication/register"
private val TAG: String = "Test"
val baseURL = "http://"

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand All @@ -25,11 +25,8 @@ class MainActivity : AppCompatActivity() {
}

private fun callService() {
// var serviceName = baseURL /*+ "register"*/
var serviceName = "http://topsunapi.arhamsoft.com/api/product/1?pageNo=1&pageSize=12"
var serviceName = baseURL /*+ "register"*/
val headers = HashMap<String, String>()
headers["TopsunAuth"] = "Basic c2FtcGxldXNlcjE6QWRtaW5AMTIz"
// headers["Content-Type"] = "application/json; charset=utf-8"
val queue = VolleyQueue.getInstance(this)
queue.headers = headers

Expand All @@ -42,7 +39,7 @@ class MainActivity : AppCompatActivity() {
params.put("LastName", "Test")

networkController.isFinishActivity = true
networkController.callService(NetworkConst.POST, baseURL, null, testAPI,
networkController.callService(NetworkConst.POST, serviceName, null, TAG,
JSONObject::class.java, object : VolleyResponse {
override fun onSuccess(response: Any, tag: String) {
Log.e("onSuccess", tag)
Expand All @@ -51,7 +48,6 @@ class MainActivity : AppCompatActivity() {
override fun onFailure(message: String) {
Log.e("onFailure", message)
}

}, params, true)
}

Expand Down

0 comments on commit ef194d3

Please sign in to comment.