Getting Started

  • What is Trailhead
  • myTrailhead
  • Trailblazer Community
  • Career Growth

Learn

  • Trails
  • Trailmixes
  • Modules
  • Projects

Credentials

  • Superbadges
  • Certifications
  • Maintain Certifications

Salesforce

  • Salesforce.com
  • AppExchange
  • Developers
  • Help Portal
© 2026 Salesforce, Inc. All rights reserved. Privacy Terms of Use Trust Accessibility Cookie Preferences
SalesforceTrailhead
  • Today
Apex Integration Services

Apex REST Callouts

+600 Points~35 minsHands-On Challenge
Apex Integration ServicesApex REST Callouts

Org:Mindful Goat Playground

Topics

  • Concepts
  • Hands-On Challenge

Looking for help?

Explore Help ResourcesShare Your Feedback
Learning Objectives

After completing this unit, you'll be able to:

  • Make REST callouts.
  • Test callouts with mocks.

Concepts

Use Http, HttpRequest, and HttpResponse to call REST services. Tests can't make real callouts, so implement HttpCalloutMock to return a canned response.

Hands-On Challenge

  1. Create AnimalLocator with a method getAnimalNameById(Integer id) that calls the animals endpoint.
  2. Write a mock and a test with 100% coverage.
Check ChallengeDemo check
Previous unitApex Integration OverviewNext unit Apex SOAP Callouts