public class HTTPUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
httpBodyToXml(InputStream httpBody,
String contentType)
Serializes an HTTP request body into XML.
|
static String |
httpBodyToXml(String httpBody,
String contentType)
Serializes an HTTP request body into XML.
|
static Map<String,String> |
parseHeaders(String str)
Converts a block of HTTP header fields into a Map containing each header key and value.
|
public static Map<String,String> parseHeaders(String str) throws Exception
str - The block of HTTP header fields to convert.Exception - If the header string could not be parsed.public static String httpBodyToXml(InputStream httpBody, String contentType) throws javax.mail.MessagingException, IOException, com.mirth.connect.donkey.util.DonkeyElement.DonkeyElementException, ParserConfigurationException
httpBody - The request body/payload input stream to parse.contentType - The MIME content type of the request.javax.mail.MessagingException - If the body could not be converted into a multipart object.IOException - If the body could not be read into a string.com.mirth.connect.donkey.util.DonkeyElement.DonkeyElementException - If an XML parsing error occurs.ParserConfigurationException - If an XML or multipart parsing error occurs.public static String httpBodyToXml(String httpBody, String contentType) throws javax.mail.MessagingException, IOException, com.mirth.connect.donkey.util.DonkeyElement.DonkeyElementException, ParserConfigurationException
httpBody - The request body/payload string to parse.contentType - The MIME content type of the request.javax.mail.MessagingException - If the body could not be converted into a multipart object.IOException - If the body could not be read into a string.com.mirth.connect.donkey.util.DonkeyElement.DonkeyElementException - If an XML parsing error occurs.ParserConfigurationException - If an XML or multipart parsing error occurs.