From d81b92e80ee4e06d8ad1fdcf0ea987f9e08e23bc Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 4 Dec 2024 14:16:25 +0100 Subject: [PATCH] Improve NewMessageRaw docs --- go/message.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/go/message.go b/go/message.go index 114878106..558967803 100644 --- a/go/message.go +++ b/go/message.go @@ -99,12 +99,14 @@ func (m *Message) ExpungeContent(ctx context.Context, appId string, msgId string // Instantiates a new MessageIn object with a pre-serialized payload. // -// The payload is not normalized on the server (usually whitespace outside -// of string literals, unnecessarily escaped characters in string and such -// are fixed up by the server), and is not even required to be JSON. +// The payload is not normalized on the server. Normally, payloads are required +// to be JSON, and Svix will minify the payload before sending the webhook +// (for example, by removing extraneous whitespace or unnecessarily escaped +// characters in strings). With this function, the payload will be sent +// "as is", without any minification or other processing. // -// The last parameter can be used to change the `content-type` header to send, -// overriding the default of `application/json`. +// The `contentType` parameter can be used to change the `content-type` header +// of the webhook sent by Svix overriding the default of `application/json`. // // See the class documentation for details about the other parameters. func NewMessageInRaw(eventType string, payload string, contentType openapi.NullableString) *MessageIn {