Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

soap 1.2 request python

import requests
from requests.structures import CaseInsensitiveDict

url = "https://www.w3schools.com/xml/tempconvert.asmx"

headers = CaseInsensitiveDict()
headers["Content-Type"] = "application/soap+xml"

data = """
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <FahrenheitToCelsius xmlns="https://www.w3schools.com/xml/">
      <Fahrenheit>75</Fahrenheit>
    </FahrenheitToCelsius>
  </soap12:Body>
</soap12:Envelope>
"""

resp = requests.post(url, headers=headers, data=data)

print(resp.status_code)

Comment

PREVIOUS NEXT
Code Example
Python :: python while false loop 
Python :: class python 
Python :: python array usage 
Python :: set xlim histogram python 
Python :: python fstring 
Python :: How to rotate the 2D vector by degree in Python: 
Python :: new dataframe based on certain row conditions 
Python :: slice notation python 
Python :: connect a mean value to histogram pandas 
Python :: list comprehension 
Python :: Download video from a direct URL with Python 
Python :: How to append train and Test dataset in python 
Python :: remove space characters from string in python 
Python :: if substring not in string python 
Python :: python argparse lists flags as optional even with required 
Python :: Iterate through characters of a string in python 
Python :: how to convert python input to int 
Python :: run python script every hour 
Python :: create a superuser to access django admin 
Python :: pandas apply lambda function with assign 
Python :: how return the data timestamp after some days in python 
Python :: add to python list 
Python :: variable string in string python 
Python :: how to get key value in nested dictionary python 
Python :: group by 2 unique attributes pandas 
Python :: soup itemprop 
Python :: continue vs pass python 
Python :: fetch data from excel in python 
Python :: foreign key and primary key difference 
Python :: how to set and run flask app on terminal 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =