kullanarak http için xml dosyası gönderin sistemimde bir xml dosyasını python standart kitaplığı kullanarak bir http sunucusuna nasıl gönderebilirim?python
Q
python
7
A
cevap
9
import urllib
URL = "http://host.domain.tld/resource"
XML = "<xml />"
parameter = urllib.urlencode({'XML': XML})
a).
1
Bunu standart bir http isteği isteği ile yapabilirsiniz. En basit çözüm olurdu
response = urllib.urlopen(URL + "?%s" % parameter)
print response.read()
GET kullanarak HTTP HTTP POST
response = urllib.urlopen(URL, parameter)
print response.read()
b) kullanılarak
İlgili konular
- 1. python deyim için python deyim python ifadesi
- 2. Python dosyası Python detay
- 3. gibi Python Python
- 4. python listesi python
- 5. Python
- 6. Python
- 7. Python
- 8. Python,
- 9. Python
- 10. Python
- 11. Python
- 12. Python
- 13. Python
- 14. Python
- 15. Python
- 16. Python
- 17. Python
- 18. Python
- 19. python
- 20. Python
- 21. Python
- 22. Python
- 23. Python
- 24. Python
- 25. Python
- 26. Python
- 27. Python
- 28. Python:
- 29. Python
- 30. Python