List of usage examples for io.netty.handler.codec.http HttpHeaders clear
public abstract HttpHeaders clear();
From source file:org.ballerinalang.mime.nativeimpl.headers.RemoveAllHeaders.java
License:Open Source License
@Override public void execute(Context context) { BMap<String, BValue> entityStruct = (BMap<String, BValue>) context.getRefArgument(FIRST_PARAMETER_INDEX); if (entityStruct.getNativeData(ENTITY_HEADERS) != null) { HttpHeaders httpHeaders = (HttpHeaders) entityStruct.getNativeData(ENTITY_HEADERS); httpHeaders.clear(); }//from w w w . ja va 2 s .c o m context.setReturnValues(); }
From source file:org.ballerinalang.net.grpc.nativeimpl.headers.RemoveAll.java
License:Open Source License
@Override public void execute(Context context) { BMap<String, BValue> headerValues = (BMap<String, BValue>) context.getRefArgument(0); HttpHeaders headers = headerValues != null ? (HttpHeaders) headerValues.getNativeData(MESSAGE_HEADERS) : null;//from w w w. ja v a2s . co m if (headers != null) { headers.clear(); } context.setReturnValues(); }