|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
public @interface Supports100ContinueAnnotation which defines the handler handles the Expect: 100-Continue header. If this annoation is not present, a Expect: 100-Continue request header will be handled automatically Example:
class MyRequestHandler implements IHttpRequestHandler {
@Supports100Continue
public void onRequest(IHttpExchange exchange) throws IOException, BadMessageException {
IHttpRequest request = exchange.getRequest();
if (!request.getURI().startsWith("test") {
exchange.sendError(404);
} else {
exchange.continue();
}
...
exchange.send(new HttpResponse(201, "text/plain", "created");
}
}
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||