<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ArcGIS Online Webhook on FeaturesCreated if content is set to application/json the changesUrl comes in partially encoded in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-webhook-on-featurescreated-if/m-p/1058915#M40120</link>
    <description>&lt;P&gt;Re-creating this post:&lt;/P&gt;&lt;P&gt;The URL is indeed encoded, but maybe not in the way you're thinking if you're trying to use 'decode' methods. This format is known as an encoded URL (see&amp;nbsp;&lt;A href="https://www.w3schools.com/html/html_urlencode.asp" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.w3schools.com/html/html_urlencode.asp&lt;/A&gt;).&amp;nbsp; I can't say if the changesUrl&amp;nbsp;&lt;EM&gt;should&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;be encoded, but I agree that the webhook payload includes an encoded URL.&lt;/P&gt;&lt;P&gt;In Python, you can translate a URL-encoded string to a non-encoded URL via&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;urllib.parse.unquote&amp;nbsp;&lt;/FONT&gt;(&lt;A href="https://docs.python.org/3/library/urllib.parse.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.python.org/3/library/urllib.parse.html&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;EDIT: Carl pointed out that the requests library has similar functionality:&amp;nbsp;&lt;SPAN&gt;requests.utils.unquote(url)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 May 2021 13:03:09 GMT</pubDate>
    <dc:creator>JeffreyHolycross</dc:creator>
    <dc:date>2021-05-18T13:03:09Z</dc:date>
    <item>
      <title>ArcGIS Online Webhook on FeaturesCreated if content is set to application/json the changesUrl comes in partially encoded</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-webhook-on-featurescreated-if/m-p/1048444#M39542</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a webhook set up on a Hosted Feature Layer and for some reason the changesUrl is coming in partially encoded, for example:&lt;/P&gt;&lt;PRE&gt;        &lt;SPAN class="hljs-attr"&gt;"changesUrl"&lt;/SPAN&gt;: &lt;SPAN class="hljs-string"&gt;"https%3a%2f%2fservices2.arcgis.com%2fO48sbyo4drQXsscH%2fArcGIS%2frest%2fservices%2fFinn_Maps_HFS%2fFeatureServer%2fextractChanges%3fserverGens%3d%5b479297%2c479305%5d%26async%3dtrue%26returnUpdates%3dfalse%26returnDeletes%3dfalse%26returnAttachments%3dfalse"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a WSGI server set up (using bottle) that is the hook url so I have the entirety of python at my disposal. Outside of trying to pull out the needed information and programmatically recreating the URL...which will probably be error prone is there any other way to fix this? I tried looking on some forums to see if it was possible to decode an 'encoded' string ( I mean it's encoded, but not 'encoded' by python so the decode method won't be available) and it doesn't seem to be or at least it's not common.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm guessing if I use url form encoded content type I probably won't have this issue because I set up a scenario on integromat and this was no problem. Issue here is that I have my route set up application/json already and don't really want to change that if I don't have to&lt;/P&gt;&lt;P&gt;Any suggestions? Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 14:29:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-webhook-on-featurescreated-if/m-p/1048444#M39542</guid>
      <dc:creator>CarlVricella1</dc:creator>
      <dc:date>2021-04-17T14:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Webhook on FeaturesCreated if content is set to application/json the changesUrl comes in partially encoded</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-webhook-on-featurescreated-if/m-p/1050260#M39649</link>
      <description>&lt;P&gt;Awesome that is exactly what I was looking for, thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit: In-case anyone is interested, there is also a requests module equivalent: requests.utils.unquote(url)&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 20:16:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-webhook-on-featurescreated-if/m-p/1050260#M39649</guid>
      <dc:creator>CarlVricella1</dc:creator>
      <dc:date>2021-04-23T20:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Webhook on FeaturesCreated if content is set to application/json the changesUrl comes in partially encoded</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-webhook-on-featurescreated-if/m-p/1058915#M40120</link>
      <description>&lt;P&gt;Re-creating this post:&lt;/P&gt;&lt;P&gt;The URL is indeed encoded, but maybe not in the way you're thinking if you're trying to use 'decode' methods. This format is known as an encoded URL (see&amp;nbsp;&lt;A href="https://www.w3schools.com/html/html_urlencode.asp" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.w3schools.com/html/html_urlencode.asp&lt;/A&gt;).&amp;nbsp; I can't say if the changesUrl&amp;nbsp;&lt;EM&gt;should&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;be encoded, but I agree that the webhook payload includes an encoded URL.&lt;/P&gt;&lt;P&gt;In Python, you can translate a URL-encoded string to a non-encoded URL via&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;urllib.parse.unquote&amp;nbsp;&lt;/FONT&gt;(&lt;A href="https://docs.python.org/3/library/urllib.parse.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.python.org/3/library/urllib.parse.html&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;EDIT: Carl pointed out that the requests library has similar functionality:&amp;nbsp;&lt;SPAN&gt;requests.utils.unquote(url)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 13:03:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-webhook-on-featurescreated-if/m-p/1058915#M40120</guid>
      <dc:creator>JeffreyHolycross</dc:creator>
      <dc:date>2021-05-18T13:03:09Z</dc:date>
    </item>
  </channel>
</rss>

