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
Keith Stephens 18Keith Stephens 18 

C# Rest service and Salesforce

Hello All,
I have the follwoing Rest call in Salesforce development console and it seems to be working, but how to I read the request in my C# method the URI is pointing too.
String Soql = 'SELECT LastModifiedDate,Plaintiff_Full_Name__c,Plaintiff_Last_Name__c FROM Case limit 3';
List<sObject> L = Database.query(Soql);
Bolden,Plaintiff_Last_Name__c=Bolden,Id=500g000000G3NmpAAF})';

String jsonResponse = Json.serialize(L);

String url = 'http://localhost:1025/ErpApiService/api/PriceForCustomerB/';

Http h = new Http();
HttpRequest req = new HttpRequest();
system.debug('got request');
req.setHeader('Content-Type', 'application/json');

req.setEndpoint(url);
system.debug('setendpoint');
//req.setMethod('GET');
req.setMethod('POST');
req.setBody(jsonResponse);
HttpResponse res = h.send(req);
Thanks for any help or advice,
Keith.
 
Keith Stephens 18Keith Stephens 18
Please dissregard line 3, it is not suppose to be there.