response.body pointing to null
Closed this issue · 4 comments
MartinhoMCM commented
When I run the app, I receive this error:
Process: io.futurestud.retrofit1, PID: 7044
java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
at android.widget.ArrayAdapter.getCount(ArrayAdapter.java:344)
at android.widget.ListView.setAdapter(ListView.java:493)
at io.futurestud.retrofit1.ui.MainActivity$1.onResponse(MainActivity.java:46)
peitek commented
Our organization's name changed from fs-opensource
to futurestudio
. If you change that in the code, it should work again.
MartinhoMCM commented
Thank you very much. You're right.
Norman Peitek <notifications@github.com> escreveu no dia quinta, 25/04/2019
à(s) 16:38:
… Our organization's name changed from fs-opensource to futurestudio. If
you change that in the code, it should work again.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE2YSJAMCXYWV4XAVRNI5STPSHF6NANCNFSM4HILRHDQ>
.
MartinhoMCM commented
Hello, I need a help.
I want to acess an API with token authentication. So I have a the token
How to pass a token in a header.
Here's the problem:
The HTTP GET request must provide a Header Authorization: Token
TOKEN_AUTHENHTICATION and Content-Type: application / json.
Norman Peitek <notifications@github.com> escreveu no dia sexta, 26/04/2019
à(s) 15:29:
… Closed #1
<#1>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE2YSJH4APCR5CQLXXPGCQDPSMGWHANCNFSM4HILRHDQ>
.
peitek commented
This may help you: https://futurestud.io/tutorials/retrofit-token-authentication-on-android