org.xlightweb
Annotation Type Supports100Continue


@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
public @interface Supports100Continue

Annotation 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");
    }
    
 }