Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions feign-core/src/main/java/feign/Body.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
/**
* A possibly templated body of a PUT or POST command. variables wrapped in curly braces are expanded before the
* request is submitted.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* &#064;Body(&quot;&lt;v01:getResourceRecordsOfZone&gt;&lt;zoneName&gt;{zoneName}&lt;/zoneName&gt;&lt;rrType&gt;0&lt;/rrType&gt;&lt;/v01:getResourceRecordsOfZone&gt;&quot;)
* List&lt;Record&gt; listByZone(&#64;Named(&quot;zoneName&quot;) String zoneName);
* </pre>
* <p/>
* <br>
* Note that if you'd like curly braces literally in the body, urlencode
* them first.
*
Expand Down
2 changes: 0 additions & 2 deletions feign-core/src/main/java/feign/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Collection;
Expand Down
8 changes: 4 additions & 4 deletions feign-core/src/main/java/feign/Feign.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/**
* Feign's purpose is to ease development against http apis that feign
* restfulness.
* <p/>
* <br>
* In implementation, Feign is a {@link Feign#newInstance factory} for
* generating {@link Target targeted} http apis.
*/
Expand Down Expand Up @@ -122,11 +122,11 @@ public static class Defaults {
}

/**
* <p/>
* <br>
* Configuration keys are formatted as unresolved <a href=
* "http://docs.oracle.com/javase/6/docs/jdk/api/javadoc/doclet/com/sun/javadoc/SeeTag.html"
* >see tags</a>.
* <p/>
* <br>
* For example.
* <ul>
* <li>{@code Route53}: would match a class such as
Expand All @@ -138,7 +138,7 @@ public static class Defaults {
* <li>{@code Route53#listByNameAndType(String, String)}: would match a
* method such as {@code denominator.route53.Route53#listAt(String, String)}
* </ul>
* <p/>
* <br>
* Note that there is no whitespace expected in a key!
*/
public static String configKey(Method method) {
Expand Down
12 changes: 6 additions & 6 deletions feign-core/src/main/java/feign/Headers.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* Expands headers supplied in the {@code value}. Variables are permitted as values.
* <p/>
* <br>
* <pre>
* &#64;RequestLine("GET /")
* &#64;Headers("Cache-Control: max-age=640000")
Expand All @@ -21,13 +21,13 @@
* }) void post(&#64;Named("token") String token);
* ...
* </pre>
* <p/>
* <br>
* <strong>Note:</strong> Headers do not overwrite each other. All headers with the same name will
* be included in the request.
* <h4>Relationship to JAXRS</h4>
* <p/>
* <br><br><b>Relationship to JAXRS</b><br>
* <br>
* The following two forms are identical.
* <p/>
* <br>
* Feign:
* <pre>
* &#64;RequestLine("POST /")
Expand All @@ -36,7 +36,7 @@
* }) void post(&#64;Named("token") String token);
* ...
* </pre>
* <p/>
* <br>
* JAX-RS:
* <pre>
* &#64;POST &#64;Path("/")
Expand Down
6 changes: 3 additions & 3 deletions feign-core/src/main/java/feign/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

/**
* An immutable request to an http server.
* <p/>
* <h4>Note</h4>
* <p/>
* <br>
* <br><br><b>Note</b><br>
* <br>
* Since {@link Feign} is designed for non-binary apis, and expectations are
* that any request can be replayed, we only support a String body.
*/
Expand Down
14 changes: 7 additions & 7 deletions feign-core/src/main/java/feign/RequestLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Expands the request-line supplied in the {@code value}, permitting path and query variables,
* or just the http method.
* <p/>
* <br>
* <pre>
* ...
* &#64;RequestLine("POST /servers")
Expand All @@ -24,25 +24,25 @@
* </pre>
* HTTP version suffix is optional, but permitted. There are no guarantees this version will impact that
* sent by the client.
* <p/>
* <br>
* <pre>
* &#64;RequestLine("POST /servers HTTP/1.1")
* ...
* </pre>
* <p/>
* <br>
* <strong>Note:</strong> Query params do not overwrite each other. All queries with the same name will
* be included in the request.
* <h4>Relationship to JAXRS</h4>
* <p/>
* <br><br><b>Relationship to JAXRS</b><br>
* <br>
* The following two forms are identical.
* <p/>
* <br>
* Feign:
* <pre>
* &#64;RequestLine("GET /servers/{serverId}?count={count}")
* void get(&#64;Named("serverId") String serverId, &#64;Named("count") int count);
* ...
* </pre>
* <p/>
* <br>
* JAX-RS:
* <pre>
* &#64;GET &#64;Path("/servers/{serverId}")
Expand Down
66 changes: 33 additions & 33 deletions feign-core/src/main/java/feign/RequestTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@

/**
* Builds a request to an http target. Not thread safe.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* A combination of {@code javax.ws.rs.client.WebTarget} and
* {@code javax.ws.rs.client.Invocation.Builder}, ensuring you can modify any
* part of the request. However, this object is mutable, so needs to be guarded
Expand Down Expand Up @@ -74,20 +74,20 @@ public RequestTemplate(RequestTemplate toCopy) {
/**
* Targets a template to this target, adding the {@link #url() base url} and
* any authentication headers.
* <p/>
* <p/>
* <br>
* <br>
* For example:
* <p/>
* <br>
* <pre>
* public Request apply(RequestTemplate input) {
* input.insert(0, url());
* input.replaceHeader(&quot;X-Auth&quot;, currentToken);
* return input.asRequest();
* }
* </pre>
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* This call is similar to
* {@code javax.ws.rs.client.WebTarget.resolveTemplates(templateValues, true)}
* , except that the template values apply to any part of the request, not
Expand Down Expand Up @@ -151,7 +151,7 @@ private static String urlEncode(Object arg) {
/**
* Expands a {@code template}, such as {@code username}, using the {@code variables} supplied. Any unresolved
* parameters will remain.
* <p/>
* <br>
* Note that if you'd like curly braces literally in the {@code template},
* urlencode them first.
*
Expand Down Expand Up @@ -227,16 +227,16 @@ public String url() {
/**
* Replaces queries with the specified {@code configKey} with url decoded
* {@code values} supplied.
* <p/>
* <br>
* When the {@code value} is {@code null}, all queries with the {@code configKey}
* are removed.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Like {@code WebTarget.query}, except the values can be templatized.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* template.query(&quot;Signature&quot;, &quot;{signature}&quot;);
* </pre>
Expand Down Expand Up @@ -274,13 +274,13 @@ private String encodeIfNotVariable(String in) {
/**
* Replaces all existing queries with the newly supplied url decoded
* queries.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Like {@code WebTarget.queries}, except the values can be templatized.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* template.queries(ImmutableMultimap.of(&quot;Signature&quot;, &quot;{signature}&quot;));
* </pre>
Expand Down Expand Up @@ -323,17 +323,17 @@ public Map<String, Collection<String>> queries() {
/**
* Replaces headers with the specified {@code configKey} with the
* {@code values} supplied.
* <p/>
* <br>
* When the {@code value} is {@code null}, all headers with the {@code configKey}
* are removed.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Like {@code WebTarget.queries} and {@code javax.ws.rs.client.Invocation.Builder.header},
* except the values can be templatized.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* template.query(&quot;X-Application-Version&quot;, &quot;{version}&quot;);
* </pre>
Expand Down Expand Up @@ -364,14 +364,14 @@ public RequestTemplate header(String configKey, Iterable<String> values) {

/**
* Replaces all existing headers with the newly supplied headers.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Like {@code Invocation.Builder.headers(MultivaluedMap)}, except the
* values can be templatized.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* template.headers(ImmutableMultimap.of(&quot;X-Application-Version&quot;, &quot;{version}&quot;));
* </pre>
Expand Down Expand Up @@ -399,7 +399,7 @@ public Map<String, Collection<String>> headers() {

/**
* replaces the {@link feign.Util#CONTENT_LENGTH} header.
* <p/>
* <br>
* Usually populated by {@link feign.codec.BodyEncoder} or {@link feign.codec.FormEncoder}
*
* @see Request#body()
Expand Down
8 changes: 4 additions & 4 deletions feign-core/src/main/java/feign/Response.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private Response(int status, String reason, Map<String, Collection<String>> head
/**
* status code. ex {@code 200}
*
* @see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" />
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" >rfc2616</a>
*/
public int status() {
return status;
Expand All @@ -86,9 +86,9 @@ public interface Body extends Closeable {

/**
* length in bytes, if known. Null if not.
* <p/>
* <h4>Note</h4> This is an integer as most implementations cannot do
* bodies > 2GB. Moreover, the scope of this interface doesn't include
* <br>
* <br><br><b>Note</b><br> This is an integer as most implementations cannot do
* bodies greater than 2GB. Moreover, the scope of this interface doesn't include
* large bodies.
*/
Integer length();
Expand Down
2 changes: 1 addition & 1 deletion feign-core/src/main/java/feign/Retryer.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void continueOrPropagate(RetryableException e) {

/**
* Calculates the time interval to a retry attempt.
* <p/>
* <br>
* The interval increases exponentially with each attempt, at a rate of
* nextInterval *= 1.5 (where 1.5 is the backoff factor), to the maximum
* interval.
Expand Down
16 changes: 8 additions & 8 deletions feign-core/src/main/java/feign/Target.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import static feign.Util.emptyToNull;

/**
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Similar to {@code javax.ws.rs.client.WebTarget}, as it produces requests.
* However, {@link RequestTemplate} is a closer match to {@code WebTarget}.
*
Expand All @@ -41,20 +41,20 @@ public interface Target<T> {
/**
* Targets a template to this target, adding the {@link #url() base url} and
* any authentication headers.
* <p/>
* <p/>
* <br>
* <br>
* For example:
* <p/>
* <br>
* <pre>
* public Request apply(RequestTemplate input) {
* input.insert(0, url());
* input.replaceHeader(&quot;X-Auth&quot;, currentToken);
* return input.asRequest();
* }
* </pre>
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* This call is similar to {@code javax.ws.rs.client.WebTarget.request()},
* except that we expect transient, but necessary decoration to be applied
* on invocation.
Expand Down
8 changes: 4 additions & 4 deletions feign-core/src/main/java/feign/codec/BodyEncoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public interface BodyEncoder {
/**
* Converts objects to an appropriate representation. Can affect any part of
* {@link RequestTemplate}.
* <p/>
* <br>
* Ex.
* <p/>
* <br>
* <pre>
* public class GsonEncoder implements BodyEncoder {
* private final Gson gson;
Expand All @@ -38,10 +38,10 @@ public interface BodyEncoder {
* }
* }
* </pre>
* <p/>
* <br>
* If a parameter has no {@code *Param} annotation, it is passed to this
* method.
* <p/>
* <br>
* <pre>
* &#064;POST
* &#064;Path(&quot;/&quot;)
Expand Down
Loading