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

anyone answe pls

It is in Curl for makign Api calout for post method 

curl -H 'Accept: application/xml' -H 'Content-Type:application/xml' \
-u api_key:api_token -d '<message><data><result>

But How do make callout in Apex calss forthe above 
Specially for authentication  -u api_key:api_token
I have api key and token 
Nayana KNayana K
Check this link:

I think below is what you are looking into:
// Add basic authentication to header
// Create blob of user:pass
Blob headerValue = Blob.valueOf(username + ':' + password);
// Base 64 Encode the blob and prepend "Basic "
String authorizationHeader = 'Basic ' + EncodingUtil.base64Encode(headerValue);
// Add the basic auth string to the Request Header
req.setHeader('Authorization', authorizationHeader);

Thank you Nayana . I will try this and let you know
I have one meore question 
We need to set up URL  in our end  to receive some kind of notification from external system
For that, we need to authenticate the request 
Could you please let me know if salesforce support HTTP Basic Authetication for incomming request. Since They (External system) are not supprting OAUth authetication.