String jSONStr=jGen.getAsString();
string url='https://test.myshopify.com/admin/';
string EndPointUrl=url+'orders.json';
HttpRequest req = new HttpRequest();
req.setEndpoint(EndPointUrl);
req.setMethod('POST');
String username =APIKEY;
String password =passwordfromApps Tab;
Blob headerValue = Blob.valueOf(username + ':' + password);
String authorizationHeader = 'Basic ' +
EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization', authorizationHeader);
req.setHeader('content-type','application/json');
req.setBody(jSONStr);
Http http = new Http();
HTTPResponse res = http.send(req);
System.debug('*****Response*****'+res.getBody());
string url='https://test.myshopify.com/admin/';
string EndPointUrl=url+'orders.json';
HttpRequest req = new HttpRequest();
req.setEndpoint(EndPointUrl);
req.setMethod('POST');
String username =APIKEY;
String password =passwordfromApps Tab;
Blob headerValue = Blob.valueOf(username + ':' + password);
String authorizationHeader = 'Basic ' +
EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization', authorizationHeader);
req.setHeader('content-type','application/json');
req.setBody(jSONStr);
Http http = new Http();
HTTPResponse res = http.send(req);
System.debug('*****Response*****'+res.getBody());
Wow Awesome tutorial. Keep up the good work guys!!
ReplyDeleteThank you
Delete