Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httpfile function support PUT method #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/com/scudata/dm/HttpFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public InputStream getInputStream() {
if( params != null ) {
OutputStream os = conn.getOutputStream();
//jdk�е���conn.getOutputStream()����ʱ����ǿ�н����η�����Ϊpost��Ҫʹ��get�������Σ���Ҫʹ��������η������conn�ķ����޸�Ϊget
if( "GET".equalsIgnoreCase( sendParamMethod ) ) {
if( !"POST".equalsIgnoreCase( sendParamMethod ) ) {
List<Field> fields = new ArrayList<Field>() ;
Class tempClass = conn.getClass();
while( tempClass != null ) {//������Ϊnull��ʱ��˵�����������ϲ�ĸ���(Object��).
Expand All @@ -157,7 +157,7 @@ public InputStream getInputStream() {
for (Field field : fields) {
if("method".equals(field.getName())){
field.setAccessible(true);
field.set(conn,"GET");
field.set(conn,sendParamMethod.toUpperCase());
}
}
}
Expand Down