- Timestamp:
- 08/06/09 18:50:46 (4 years ago)
- Location:
- lang/vb2005/Tween/trunk/Tween
- Files:
-
- 2 modified
-
Connection/HttpConnection.vb (modified) (5 diffs)
-
Tween.vbproj (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/vb2005/Tween/trunk/Tween/Connection/HttpConnection.vb
r34737 r34799 1 1 Imports System.Net 2 2 3 '''<summary> 4 '''HttpWebRequest,HttpWebResponse��p�������I�ȒʐM�@�\�������'''</summary> 5 '''<remarks> 6 '''�v���L�V���Ȃǂ�肷�邽�߁A�g�p�O�ɐÓI���\�b�hInitializeConnection��яo�����ƁB 7 '''�ʐM�����ĕK�v�ɂȂ�TP�w�b�_�̕t��Ȃǂ́A�h���N���X��etContent���\�b�h��[�o�[���C�h���čs���B 8 '''</remarks> 3 9 Public Class HttpConnection 10 '''<summary> 11 '''�v���L�V 12 '''</summary> 4 13 Private Shared _proxy As System.Net.WebProxy = Nothing 14 15 '''<summary> 16 '''���[�U�[���I����v���L�V�̕� '''</summary> 5 17 Private Shared _proxyType As ProxyType = ProxyType.IE 18 19 '''<summary> 20 '''CreateRequest���\�b�h�Ŏw�肪�ȗ����ꂽ�ۂɎg�p�����M�^�C���A�E�g���ԁims�j 21 '''</summary> 6 22 Private Shared _defaultTimeOut As Integer = 20000 23 24 '''<summary> 25 '''�N�b�L�[�ۑ��p�R���e�i 26 '''</summary> 7 27 Private Shared _cookieContainer As New CookieContainer 8 28 29 '''<summary> 30 '''HTTP�ʐM�̃��\�b�h 31 '''</summary> 32 '''<remarks> 33 '''���̃��\�b�h�iHEAD,PUT,CONNECT�Ȃǁj���K�v�ȏꍇ�͒lj���邱�� 34 '''</remarks> 9 35 Protected Enum RequestMethod 10 36 ReqGet … … 12 38 End Enum 13 39 40 '''<summary> 41 '''HTTP�ʐM���ăR���e���c���������������e���c�j 42 '''</summary> 43 '''<remarks> 44 '''�ʐM�^�C���A�E�g�Ȃ�ebException����h�����Ă��Ȃ����߁A�Ăяo�����ŏ������K�v�B 45 '''�^�C���A�E�g�w�����X�|���X�w�b�_�擾�͏ȗ����Ă��� 46 '''���X�|���X�̃{�f�B�X�g���[������ϊ�����ontent���i�[���Ė߂��B�����G���R�[�h�͖��w�� '''</remarks> 47 '''<param name="method">HTTP�̃��\�b�h</param> 48 '''<param name="url">URL</param> 49 '''<param name="param">key=value�ɓW�J�����A�N�G���iGET���j�E�{�f�B�iPOST���j�ɕt��������M��</param> 50 '''<param name="content">HTTP���X�|���X�̃{�f�B���f�[�^�ԋp�p�B�Ăяo�����ŏ����K�v</param> 51 '''<returns>�ʐM���ʂ�ttpStatusCode</returns> 14 52 Protected Overridable Function GetContent(ByVal method As RequestMethod, _ 15 53 ByVal url As System.Uri, _ … … 30 68 End Function 31 69 70 '''<summary> 71 '''HTTP�ʐM���ăR���e���c��������摜�R���e���c�j 72 '''</summary> 73 '''<remarks> 74 '''�ʐM�^�C���A�E�g�Ȃ�ebException����h�����Ă��Ȃ����߁A�Ăяo�����ŏ������K�v�B 75 '''�^�C���A�E�g�w�����X�|���X�w�b�_�擾�͏ȗ����Ă��� 76 '''���X�|���X�̃{�f�B�X�g���[����map�ɕϊ�����ontent���i�[���Ė߂��B 77 '''</remarks> 78 '''<param name="method">HTTP�̃��\�b�h</param> 79 '''<param name="url">URL</param> 80 '''<param name="param">key=value�ɓW�J�����A�N�G���iGET���j�E�{�f�B�iPOST���j�ɕt��������M��</param> 81 '''<param name="content">HTTP���X�|���X�̃{�f�B���f�[�^�ԋp�p�B�Ăяo�����ŏ����K�v</param> 82 '''<returns>�ʐM���ʂ�ttpStatusCode</returns> 32 83 Protected Overridable Function GetContent(ByVal method As RequestMethod, _ 33 84 ByVal url As System.Uri, _ … … 48 99 ByVal url As System.Uri, _ 49 100 ByVal param As System.Collections.Generic.SortedList(Of String, String)) As HttpWebRequest 101 Return CreateRequest(method, url, _defaultTimeOut, param) 102 End Function 103 104 Protected Shared Function CreateRequest(ByVal method As RequestMethod, _ 105 ByVal url As System.Uri, _ 106 ByVal timeout As Integer, _ 107 ByVal param As System.Collections.Generic.SortedList(Of String, String)) As HttpWebRequest 50 108 51 109 Dim ub As New System.UriBuilder(url.AbsoluteUri) … … 55 113 Dim webReq As HttpWebRequest = DirectCast(WebRequest.Create(ub.Uri), HttpWebRequest) 56 114 57 webReq.Timeout = _defaultTimeOut115 webReq.Timeout = timeout 58 116 If _proxyType <> ProxyType.IE Then webReq.Proxy = _proxy 59 117 -
lang/vb2005/Tween/trunk/Tween/Tween.vbproj
r34737 r34799 82 82 <Compile Include="ApplicationEvents.vb" /> 83 83 <Compile Include="Connection\HttpConnection.vb" /> 84 <Compile Include="Connection\HttpConnectionOAuth.vb" /> 84 85 <Compile Include="DetailsListView.vb"> 85 86 </Compile>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)