hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ossf...@dubioso.net>
Subject Re: HttpCore to mock remote servers in unit tests?
Date Fri, 06 Apr 2007 16:05:17 GMT
Hi Stefan,

> So I thought, I could set up a small server based on
> HttpCore-components.

There's one in the test code for HttpCore, and a slightly different
one in the test code for HttpClient (though the latter still lacks
some pieces for expect-continue handling). Both are based on the
HttpService class and the ElementalHttpServer example.

> I progressed up to the point where I actually
> were about to check parameters of the requests, the mocked server
> received. There I stuck since HttpCore's HttpRequest-Interface is
> lacking any higher level API to read it's parameters.
> 
> Maybe, that interface is just not intended to serve use cases like the
> one described above?

Exactly. "Core" is not a higher level API. See our project charter,
section "Project Scope", item 2:

   Jakarta HttpComponents will provide ONLY a toolset of low level
   generic transport APIs. In particular, server side application
   layer APIs WILL NOT be developed.
   http://jakarta.apache.org/httpcomponents/charter.html

Please use the Servlet API for that purpose, for example in Tomcat:
	http://tomcat.apache.org/
Our project charter was specifically drafted to avoid scope clashes
with other Apache projects.

cheers,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message