[
https://issues.apache.org/jira/browse/HTTPCLIENT-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401739#comment-13401739
]
miles zarathustra commented on HTTPCLIENT-1201:
-----------------------------------------------
I added a file containing complete source code that can be compiled and run.
(GetPostExample.java) When I put it in ...src/site/resources/ it wound up in
the right place for the link I added to the quickstart page work. The java
file contains a suggestion to look at chapter 1 of the tutorial for help on
builders.
I reworded the preamble to the inline sample fragment slightly. Also, I added
catch() {} blocks since it won't compile without them, and moved the try{
statements back to where they needed to be.
You probably want to check the java file to be sure I didn't engage in any
egregious violations of protocol. I was able to compile and run it, and get
the current weather in Sunnyvale.
To be symmetrical, I could be persuaded to do the same thing with the fluent
example. I notice that the comment regarding the fluent-hc*.jar is somewhat
spurious, since this file already appears in the list above. However, it would
be meaningful if this page enumerated the subset of files actually needed to
run the example, which I believe is less than the entire list given.
Hope this helps...
-= miles =-
> provide basic documentation in an obvious place
> -----------------------------------------------
>
> Key: HTTPCLIENT-1201
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1201
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: Documentation
> Affects Versions: 4.2 Final
> Reporter: miles zarathustra
> Priority: Minor
> Fix For: 4.2.1
>
> Attachments: GetPostExample.java, site-1.patch, site.patch
>
>
> The only documentation obviously linked from the main HttpClient page is the
> "tutorial." This "tutorial" talks about a lot of esoteric arcane junk I
> don't care about, but gives no clue on how to send parameters via a basic
> post. For that, I have to go here:
> http://wiki.apache.org/HttpComponents/QuickStart
> It's very difficult to find, and it's a lot easier to google examples that
> don't work. I wound up trying 4 different purported solutions before I found
> this one that works. If you look around the web you'll notice that people
> generally find the httpclient documentation frustrating. I have colleagues
> who argue that it would be easier to just write the post logic from scratch
> than figure out how the silly apache stuff works, and it's difficult for me
> to contradict them.
> It would be SO easy to improve the situation by making links to already
> available examples of the basic operations in an obvious place.
> The FAQ that explains some things about WHY the posts work in the totally
> non-intuitive way that they do would be nice also.
> Thanks.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]