<?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 How to call a Web Service from Python with athentication in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-call-a-web-service-from-python-with/m-p/327272#M25416</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to call a&amp;nbsp; HTTP web service from Python using urllib, urllib2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I need to add authentication adding the UserID and Password in order to call the another service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the existing code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy, urllib, urllib2,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;url = r'&lt;/SPAN&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwwww.example.com%2FGISAddress%2FCheck.asmx%2FVerifyAddress" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline; "&gt;https://wwww.example.com/GISAddress/Check.asmx/VerifyAddress&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;BR /&gt; values = {'myAddress' : '100 SW 10 street'}&lt;/P&gt;&lt;P&gt;data = urllib.urlencode(values)&lt;BR /&gt; req = urllib2.Request(url, data)&lt;BR /&gt; response = urllib2.urlopen(req)&lt;BR /&gt; the_page = response.read()&lt;BR /&gt; t = ET.fromstring(the_page)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2019 14:27:17 GMT</pubDate>
    <dc:creator>JoseSanchez</dc:creator>
    <dc:date>2019-09-18T14:27:17Z</dc:date>
    <item>
      <title>How to call a Web Service from Python with athentication</title>
      <link>https://community.esri.com/t5/python-questions/how-to-call-a-web-service-from-python-with/m-p/327272#M25416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to call a&amp;nbsp; HTTP web service from Python using urllib, urllib2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I need to add authentication adding the UserID and Password in order to call the another service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the existing code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy, urllib, urllib2,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;url = r'&lt;/SPAN&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwwww.example.com%2FGISAddress%2FCheck.asmx%2FVerifyAddress" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline; "&gt;https://wwww.example.com/GISAddress/Check.asmx/VerifyAddress&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;BR /&gt; values = {'myAddress' : '100 SW 10 street'}&lt;/P&gt;&lt;P&gt;data = urllib.urlencode(values)&lt;BR /&gt; req = urllib2.Request(url, data)&lt;BR /&gt; response = urllib2.urlopen(req)&lt;BR /&gt; the_page = response.read()&lt;BR /&gt; t = ET.fromstring(the_page)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2019 14:27:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-call-a-web-service-from-python-with/m-p/327272#M25416</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2019-09-18T14:27:17Z</dc:date>
    </item>
  </channel>
</rss>

