Sometimes, a web request will need to include additional header information for it to be accepted by the web service. For example, if an authorization header is required by the web service, it can either be provided as a static value or as a method parameter using the @Header annotation.
- [Instructor] Up until now, every request…we have made to the GitHub API…has been an anonymous request,…meaning that all the data we have been accessing…is public data.…In most cases, though, you won't be doing this.…You will need to log in or provide credentials to the API,…so that you can be authenticated and access the data.…RESTful APIs will typically look for credentials…in the headers of the request,…specifically the authorization header,…which includes a type and credentials.…
One of the most common types that you will encounter…when working with RESTful web services is basic.…The credentials then are a combination…of the username and password separated by a colon…and then encoded as a base64 string.…Quickly, base64 is a set of encoding schemes…used to represent binary data as an asking string,…but don't worry too much about this.…We won't have to figure out how to do…any of the encoding or decoding ourselves.…
Now that we know how to provide…credentials and requests to the GitHub API,…let's do it in Android Studio.…
- REST API basics
- Methods for reading and writing data
- Defining data models with Retrofit
- Implementing an API interface
- Getting data with a Retrofit call
- Authorizing requests
- Putting, deleting, and posting data
- Customizing the data converter
- Working with the request and response headers
Skill Level Intermediate
Android App Development: Enterprise Integrationwith Jon-Luke West47m 51s Intermediate
Android App Development: Data Persistence Librarieswith Annyce Davis4h 52m Intermediate
1. HTTP APIs
2. Get Started with Retrofit
3. Finish the Sample App
4. More Configuration Options
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.