Anyone using episervers hubspot connector is likely going to be facing issues with forms not being able to correctly submit data to hubspot.
I have contacted epi support because their current implementation will be affected by this. But in the meantime I have been investigating if i can use the IOC to override the IHubSpotService and implement my own code. Unfortunately I haven't been that successful.
I've tried multiple things (ConfigureContainer(ServiceConfigurationContext context)) / context.Services.AddTransient / context.StructureMap().Configure but nothing seems to work for this class. I'm able to override other interfaces with my own implementations but this one has me stuck.
Basically episervers method (CallHubSpot()) needs to have the extra header added...
Has anyone had any success in implementing their own version of this Interface?
On a side note - using episerver forms and hubspot, I'm curious what other implementations are out there. Are people just not using episervers connector and using their own code to talk directly to the hubspot API ?
Episerver.Marketing.Connector.HubSpot, Version=4.1.0.0
namespace EPiServer.MarketingAutomation.HubSpotService.Contracts.Interfaces
public interface IHubSpotService
namespace EPiServer.MarketingAutomation.HubSpotService
Hubspot has changed their API and now requires a header that describes the ContentType. See link here: https://developers.hubspot.com/changelog/contacts-api-v1-415-unsupported-media-type-errors-for-requests-missing-the-content-type-header.
Anyone using episervers hubspot connector is likely going to be facing issues with forms not being able to correctly submit data to hubspot.
I have contacted epi support because their current implementation will be affected by this. But in the meantime I have been investigating if i can use the IOC to override the IHubSpotService and implement my own code. Unfortunately I haven't been that successful.
I've tried multiple things (ConfigureContainer(ServiceConfigurationContext context)) / context.Services.AddTransient / context.StructureMap().Configure but nothing seems to work for this class. I'm able to override other interfaces with my own implementations but this one has me stuck.
Basically episervers method (CallHubSpot()) needs to have the extra header added...
headers.Add("User-Agent", "Episerver Hubspot Provider");
headers.Add("Content-Type", "application/json"); <-- missing
Has anyone had any success in implementing their own version of this Interface?
On a side note - using episerver forms and hubspot, I'm curious what other implementations are out there. Are people just not using episervers connector and using their own code to talk directly to the hubspot API ?
Cheers