# Set ApplicationMessageType via REST API?

**URL:** <https://community.solace.com/t/set-applicationmessagetype-via-rest-api/1391>\
**Category:** Solace Event Broker\
**Tags:** net, rest, c\
**Created:** [September 14, 2022, 1:31pm UTC](https://community.solace.com/t/set-applicationmessagetype-via-rest-api/1391 "2022-09-14T13:31:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ofgirichardsonb](https://avatars.discourse-cdn.com/v4/letter/o/e99b99/32.png) [@ofgirichardsonb](https://community.solace.com/u/ofgirichardsonb)\
**Post date:** [September 14, 2022, 1:31pm UTC](https://community.solace.com/t/set-applicationmessagetype-via-rest-api/1391/1 "2022-09-14T13:31:02Z")

</div>

I rely on the ApplicationMessageType property to map received events back to the POCOs that they were generated from. I am publishing events from a Blazor WASM application, and can’t use the SolaceSystems NuGet package since it won’t run in a WASM environment. Thus, I’m using an HttpClient with the REST API. I’ve looked through the API documentation for the ApplicationMessageType message property, but I can’t see how to set this property via HTTP headers or otherwise. Can someone please point me in the right direction?

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/aaron/32/843_2.png) [@Aaron](https://community.solace.com/u/Aaron)\
**Post date:** [September 15, 2022, 4:14pm UTC](https://community.solace.com/t/set-applicationmessagetype-via-rest-api/1391/2 "2022-09-15T16:14:45Z")

</div>

Hey @ofgirichardsonb . Unfortunately that’s one of the message headers you can’t set with REST. It’s too bad we don’t have parity across all our APIs and protocols. Couple options:  
Use another header (HTTP Content Type or Content Encoding) [IMessage.HttpContentType Property](https://docs.solace.com/API-Developer-Online-Ref-Documentation/net/html/5e3fb3cf-9bf0-04ea-896f-0bc7c9a30848.htm) Maybe a User Property instead? I don’t know much about WASM or Blazor or anything, but maybe there’s other messaging libraries you could try, might give you better performance than REST?  
MQTT: [GitHub - dotnet/MQTTnet: MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.](https://github.com/dotnet/MQTTnet) AMQP: [GitHub - Azure/amqpnetlite: AMQP 1.0 .NET Library](https://github.com/Azure/amqpnetlite)

---

<div class="post-metadata">

**Author:** ![ofgirichardsonb](https://avatars.discourse-cdn.com/v4/letter/o/e99b99/32.png) [@ofgirichardsonb](https://community.solace.com/u/ofgirichardsonb)\
**Post date:** [September 15, 2022, 4:17pm UTC](https://community.solace.com/t/set-applicationmessagetype-via-rest-api/1391/3 "2022-09-15T16:17:52Z")

</div>

Hello @Aaron ,  
Thank you for the ideas and links. I ended up simply creating a thin API layer that uses the TCPS protocol instead. It seems to be fast enough, though the AMQP/MQTT idea from WASM itself sounds interesting and I’ll try it out when I get a chance.
