Caused by: com.github.kittinunf.fuel.core.HttpException: HTTP Exception 404 Not Found
See original GitHub issuei got error in httppost… plase help
@SuppressLint("ShowToast")
private fun getData(npa: String) {
progressbar.visibility = View.VISIBLE
val json = JSONObject()
json.put("npa", npa)
try {
NPA.httpPost(listOf("npa" to npa))
.header()
.timeout(5000)
.timeoutRead(60000)
.responseString { _, response, result ->
progressbar.visibility = View.GONE
when (result) {
is Result.Failure -> {
Log.d("hasil gagal", result.get())
}
is Result.Success -> {
try {
Log.d("hasil sukses", result.get())
}catch (e: HttpException) {
Log.d("hasil gagal", result.get())
}
}
}
}
} catch (e: HttpException) {
}
}
this the error
06-14 19:14:37.041 17102-17102/com.gentasoft.pdgikabpasuruan E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.gentasoft.pdgikabpasuruan, PID: 17102
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
Caused by: com.github.kittinunf.fuel.core.HttpException: HTTP Exception 404 Not Found
at com.github.kittinunf.fuel.core.interceptors.ValidatorInterceptorKt$validatorResponseInterceptor$1$1.invoke(ValidatorInterceptor.kt:12)
at com.github.kittinunf.fuel.core.interceptors.ValidatorInterceptorKt$validatorResponseInterceptor$1$1.invoke(ValidatorInterceptor.kt)
at com.github.kittinunf.fuel.core.interceptors.RedirectionInterceptorKt$redirectResponseInterceptor$1$1.invoke(RedirectionInterceptor.kt:35)
at com.github.kittinunf.fuel.core.interceptors.RedirectionInterceptorKt$redirectResponseInterceptor$1$1.invoke(RedirectionInterceptor.kt)
at com.github.kittinunf.fuel.core.requests.TaskRequest.call(TaskRequest.kt:16)
at com.github.kittinunf.fuel.core.requests.AsyncTaskRequest.call(AsyncTaskRequest.kt:11)
at com.github.kittinunf.fuel.core.requests.AsyncTaskRequest.call(AsyncTaskRequest.kt:6)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)
Caused by: com.github.kittinunf.fuel.core.HttpException: HTTP Exception 404 Not Found
at com.github.kittinunf.fuel.core.interceptors.ValidatorInterceptorKt$validatorResponseInterceptor$1$1.invoke(ValidatorInterceptor.kt:12)
at com.github.kittinunf.fuel.core.interceptors.ValidatorInterceptorKt$validatorResponseInterceptor$1$1.invoke(ValidatorInterceptor.kt)
at com.github.kittinunf.fuel.core.interceptors.RedirectionInterceptorKt$redirectResponseInterceptor$1$1.invoke(RedirectionInterceptor.kt:35)
at com.github.kittinunf.fuel.core.interceptors.RedirectionInterceptorKt$redirectResponseInterceptor$1$1.invoke(RedirectionInterceptor.kt)
at com.github.kittinunf.fuel.core.requests.TaskRequest.call(TaskRequest.kt:16)
at com.github.kittinunf.fuel.core.requests.AsyncTaskRequest.call(AsyncTaskRequest.kt:11)
at com.github.kittinunf.fuel.core.requests.AsyncTaskRequest.call(AsyncTaskRequest.kt:6)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Caused by: com.github.kittinunf.fuel.core.HttpException: HTTP ...
i got error in httppost.. plase help @SuppressLint("ShowToast") private fun getData(npa: String) { progressbar.visibility = View.
Read more >Cannot see error message in http response in Kotlin Fuel
FuelError$Companion.wrap(FuelError.kt:86) Caused by: com.github.kittinunf.fuel.core.HttpException: HTTP Exception 400 Bad Request ...
Read more >Why am I getting an error code of 400 with Fuel? : r/Kotlin
FuelError$Companion.wrap(FuelError.kt:86) Caused by: com.github.kittinunf.fuel.core.HttpException: HTTP Exception 400 Bad Request ...
Read more >Bitbucket Server or Data Center displays a 404 error when ...
In this case, either the Database or the Filesystem (git repositories on the Shared home folder) will be out of sync causing orphaned...
Read more >v1.x.y - Fuel - Documentation - GitBook
The easiest HTTP networking library for Kotlin/Android. ... compile 'com.github.kittinunf.fuel:fuel-gson:<latest-version>' //for Gson support.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@congfandi try changing
to
@congfandi is this resolved? can we close this?