Currently stuck at trying to send a JSON structure through web services but keep receiving the error:

Method does not exist or incorrect signature: void send(System.HttpRequest) from the type System.HttpRequest

public class order_web_services {

public static void order_web_services_rest(String order_JSON){

    HttpRequest request = new HttpRequest();

    String endpoint = 'https://some_web_site.com';



    HttpResponse response = HttpRequest.send(request);

I am a bit confused as to why this error keeps getting thrown. Can someone please help me out.


You instantiate an Http instance, which has the send method.


HttpResponse response = HttpRequest.send(request);


HttpResponse response = new Http().send(request);

The HttpRequest does not have this method, and please note it is an instance method, not static.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.