---
schema_version: "1"
id: b9220f4e92b26eefc77e014b10f9b79a163bcfc946850c21c825967ca44e6b96
title: Http Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_classes_restful_http_http.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_restful_http_http.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 76cc0215204d9f973e1a9e0c9d5864593f2078cc37069049b348ace32696876e
description: Use the Http class to initiate an HTTP request and response.Sends an HttpRequest and returns the response.Returns a string that displays and identifies the object's properties.
---
# Http Class

Use the Http class to initiate an HTTP request and response.

## Namespace

[System](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_System.htm "The System namespace provides classes and methods for core Apex functionality.")

## Http Methods

The following are methods for Http. All are instance methods.

- **[send(request)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_restful_http_http.htm#apex_System_Http_send)**  
    Sends an HttpRequest and returns the response.
- **[toString()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_restful_http_http.htm#apex_System_Http_toString)**  
    Returns a string that displays and identifies the object's properties.

### send(request)

Sends an HttpRequest and returns the response.

#### Signature

public HttpResponse send(HttpRequest request)

#### Parameters

- **request**:
    
    Type: [System.HttpRequest](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_restful_http_httprequest.htm#apex_classes_restful_http_httprequest "Use the HttpRequest class to programmatically create HTTP requests like GET, POST, PATCH, PUT, and DELETE.")

#### Return Value

Type: [System.HttpResponse](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_restful_http_httpresponse.htm#apex_classes_restful_http_httpresponse "Use the HttpResponse class to handle the HTTP response returned by the Http class.")

### toString()

Returns a string that displays and identifies the object's properties.

#### Signature

public String toString()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")