📄 http.use
字号:
Http 1.9 build: 9208 released: 2008-08-22
HTTP library to do CGI GET/POST.
Copyright (c) 2008 Canadian Mind Products.
final class library.
Download from http://mindprod.com/products1.html#HTTP
===> Free <===
Full source included.
You may even include the source code, modified or unmodified
in commercial programs that you write and distribute.
May be used freely for any purpose but military.
For more details on this restriction, see
http://mindprod.com/roedy.html#NONMILITARY
If you include any Canadian Mind Products code in your own applications,
your app too must be labeled non-military use only.
All Java jars and source code are included.
----
Prerequisites:
This program runs under any OS,
(e.g. Win2K/XP/Vista/OSX/Linux/Solaris/Vista64/AIX...) so long as you have
<><> Java version 1.5 <><> or later installed.
See http://mindprod.com/jgloss/installingjava.html for details.
----
Installing on a PC:
Download source and compiled class files to run on your own machine as a part of your own program.
First install a recent Java JDK or JVM.
See http://mindprod.com/jgloss/installingjava.html.
To install, extract the zip download with WinZip
(or similar unzip utility) into any directory you please,
often J:\ -- ticking off the "user folder names" option.
----
Installing on a MacIntosh:
Use Safari to download source and compiled class files to run on your own machine as a part of your own program.
Safari will automatically unpack the zip into ~/Downloads (version 10.5)
[or on the Desktop (version 10.4 and earlier)].
First install a recent Java JDK or JVM.
See http://mindprod.com/jgloss/installingjava.html.
You may optionally move the download tree to a permanent home.
I don't have a MacIntosh, just a PC, so I can't test the programs for Mac compatibility.
In theory they should work without problems, but in practice that does not always happen.
If you have problems please, let me know, preferably with screenshots and complete verbatim error messages.
----
Rebuilding:
The zip already contains the necessary class and jar files, so unless you modify
the program, there is no need to recompile the source or rebuild the jar.
Configure basedir="E:/" in rebuild.xml to the drive where your files are.
Use ANT and rebuild.xml, not build.xml, to recompile and recreate the jar.
----
Use:
http is a small library of Java classes to let you do HTTP
CGI GET, POST, HEAD and "FETCH" (generic) to a server. It
will also encode parameter pairs for you.
It does nothing on its own. It is intended to be
incorporated into your own programs.
To see a sample use have a look at the
com.mindprod.submitter package, downloadable at
http://mindprod.com/products1.html#SUBMITTER
For downloading long http:, file: or https: files, see
com.mindprod.filetransfer.Download
http://mindprod.com/products1.html#FILETRANSFER
The Get, Post, Head and Probe classes only work on http: urls.
The Fetch class works on http:, https:, file: etc.
For meanings of various response codes, see
http://mindprod/jgloss/responsecode.html
Version History
1.0 2007-06-25 is the first public release though it has
been in use in slightly different form for many years.
1.1 2007-07-19 improved handling of responseCode.
1.2 2007-07-27 uses UTF-8 instead of ISO-8859-1.
1.3 2007-08-24 new Read methods that will work with
multibyte encodings. rename read methods to
readBytesBlocking and readStringBlocking.
1.4 2007-08-26 add timeout.
1.5 2007-12-30 add altervate get and post methods that take
a full URL.
1.6 2008-01-14 add ability to read gzipped streams.
1.7 2008-07-25 add configurable User-Agent, add Base Http class.
1.8 2008-07-27 handle case where URL given was not HTTP. Add generic fetch method
that works with https: file: etc. configurable Referer property.
1.9 2008-08-22 support accept-charset, accept-encoding and
accept-language. Fix bugs in gzip support.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -