Release of v24.
This commit is contained in:
@@ -7,6 +7,9 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using GraphQL.Client.Http;
|
||||
using GraphQL.Client.Serializer.Newtonsoft;
|
||||
using System.Net.Http;
|
||||
using Newtonsoft;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BodyshopPartner.Utils
|
||||
{
|
||||
@@ -28,7 +31,30 @@ namespace BodyshopPartner.Utils
|
||||
{
|
||||
logger.Trace("Firing a GQL Query!");
|
||||
logger.Trace("Firing GQL Query: {0} {1}", r.Query.ToString(), r.Variables);
|
||||
|
||||
//var content = new content("grant_type=password&username=username&password=password");
|
||||
//content.Headers.Add("Content-Type", "application/json");
|
||||
dynamic postData = new JObject();
|
||||
postData.imexshopid = AppMetaData.ActiveShopName;
|
||||
postData.operationName = r.Query.ToString();
|
||||
postData.dbevent = true;
|
||||
postData.user = AppMetaData.user;
|
||||
postData.source = "Partner";
|
||||
var httpClient = new HttpClient();
|
||||
var content = new StringContent(postData.ToString(), Encoding.UTF8, "application/json");
|
||||
|
||||
try
|
||||
{
|
||||
httpClient.PostAsync("https://api.imex.online/ioevent", content);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex,"Unable to post to IOEVENT.");
|
||||
}
|
||||
|
||||
var graphQLResponse = await g.SendQueryAsync<dynamic>(r);
|
||||
|
||||
if (graphQLResponse.Errors == null)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user