All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.genexus.ws.RestReaderInterceptor Maven / Gradle / Ivy

Go to download

Core classes for the runtime used by Java and Android apps generated with GeneXus

There is a newer version: 4.7.3
Show newest version
package com.genexus.ws;

import java.io.IOException;
import java.io.InputStream;

import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.ext.Provider;
import jakarta.ws.rs.ext.ReaderInterceptor;
import jakarta.ws.rs.ext.ReaderInterceptorContext;

@Provider
public class RestReaderInterceptor implements ReaderInterceptor {

	@Override
	public Object aroundReadFrom(ReaderInterceptorContext context) throws IOException, WebApplicationException {
		try (InputStream is = context.getInputStream();){
			InputStream isBody = com.genexus.WrapperUtils.storeRestRequestBody(is);

			context.setInputStream(isBody);
			return context.proceed();
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy