목록HTTP (3)
아미(아름다운미소)
Python3 urllib으로 http로 POST 전송 ''' Created on 2019. 12. 21. @author: test ''' import urllib.parse import urllib.request details = urllib.parse.urlencode({'CODE': '코드', 'NAME': '이름', 'KIND': '종류', 'PRICE': '가격', 'USERID': '아이디'}) details = details.encode('UTF-8') url = urllib.request.Request('https://test.cafe24.com/postdata_test.php', details) url.add_header("User-Agent","Mozilla/5.0 (Windows; U..
HTTP GET in Python Python 3: import urllib.request contents = urllib.request.urlopen("http://test.com/?name=test&tel=01022223333").read() Python 2: import urllib2 contents = urllib2.urlopen("http://test.com/?name=test&tel=01022223333").read()
스위프트(Swift)로 코딩을 하며 iOS어플 개발을 하다보면 HTTP연결이 제한되는 경우가 있습니다.iOS9부터 HTTP가 아닌 HTTPS로의 접근만 허용해놨기 때문인데요. info.plist파일의 HTTP 연결 권한을 줘야 정상적으로 통신이 가능합니다. - 모든사이트 오픈 NSAppTransportSecurity NSAllowsArbitraryLoads - 해당사이트만 오픈 NSAppTransportSecurity NSExceptionDomains yourserver.com NSExceptionAllowsInsecureHTTPLoads