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

org.webpieces.webserver.impl.body.BodyParsers Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package org.webpieces.webserver.impl.body;

import java.util.HashMap;
import java.util.Map;

import javax.inject.Inject;

public class BodyParsers {

	private Map typeToParser = new HashMap<>();
	
	@Inject
	public BodyParsers(FormUrlEncodedParser formParser) {
		typeToParser.put("application/x-www-form-urlencoded", formParser);
	}
	
	public BodyParser lookup(String typeHeader) {
		return typeToParser.get(typeHeader);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy