Android Networking - Part 23: POST Requests | Ray Wenderlich

Use an interceptor to add the OAuth2 token into requests made by Retrofit, and then make POST requests to add a new gist into the user's GitHub account.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4539-android-networking/lessons/23

This code is not working, i ran yours on the emulator also. It wasnt working

Thanks for the info, @decagon! Could you post some details on what is not working, such as where things break down and what kinds of errors you’re seeing? Thanks!

Thank you, Anytime I try to authenticate while using my username, it takes me to an error 404 page. It was working just after the authentication video, stopped working after the Post requests video

I’m still awaiting a reply please. Thank, you

Thanks @decagon! A 404 page means it’s not finding the route correctly. If you post here the code you changed in the Post request video, I could try to help you diagnose what’s going on. I’ll also run the sample code to make sure it’s working, and let you know the results in a few days. Thanks again!

D/OkHttp: {“message”:“Bad credentials”,“documentation_url”:“GitHub REST API - GitHub Docs”}. This is the error

Thanks for that @decagon. Could you possibly also post the file that you changed in that particular video? I could then try and diagose the error you are seeing. Thanks!