function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Error: Method does not exist or incorrect signature: [http].send(System.HttpRequest)

Hai All,

      Now the Apex code is fine and working.

When iam modifying small change in apex code its showing an Error


Compile Error: Method does not exist or incorrect signature: [http].send(System.HttpRequest)


and my apex,what i wrote in my controller is


public string php(blob attpdf){

HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();

req.setCompressed(true); // otherwise we hit a limit of 32000

try {
res = http.send(req);       ------> here its showing error.
} catch(System.CalloutException e) {
System.debug('Callout error: '+ e);
return null;



Can anyone tell me the solution...



It might be just a naming clash - as http is both the type and the variable name, it may be that apex considers




to be an attempt to access a static method on the http class.


Try changing your variable name to myHttp or similar.