0

I'm working with Twilio webhooks for Programmable Voice, writing some simple TwiML responses in a Go API.

Reviewing the Webhook Connection Overrides doc, I see a general link to https://en.wikipedia.org/wiki/URL. Are URL extensions a standard HTTP scheme defined within an RFC, or is this a Twilio-specific convention using the Same Document Reference as stated in https://www.rfc-editor.org/rfc/rfc3986#section-4.4 ?

I'm asking this to properly use net/http in Go.

tommy_o
  • 3,640
  • 3
  • 29
  • 33
  • Yes, url fragments are standard. How does this relate to `net/http`? – JimB Mar 21 '23 at 15:25
  • Ill modify my question to explain more correctly. Twilio takes what looks like query parameters inside the URL fragment and I need to build this server-side. – tommy_o Mar 21 '23 at 15:38
  • No client sends url fragments in a request, these are settings to control their client. There is nothing to do server side. – JimB Mar 21 '23 at 15:42

1 Answers1

1

The URI fragment # in the context of URI's can have multiple use cases. For example, if you enter http://www.example.org/foo.html#bar in a web browser, the browser should take you to the position where the CSS id selector of bar is located.

In the context of Twilio's webhook requests, anything after the # is interpreted as instructions and will not actually be sent to the web server. For example, if you specify https://example.com/foo?query=123#ct=1000 as your webhook, Twilio will only send https://example.com/foo?query=123 to the server but will interpret ct=1000 as the connection having a 1 second Connection Timeout.

Daniel O.
  • 583
  • 5
  • 15