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
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
IOException
com.mirth.connect.donkey.util.DonkeyElement.DonkeyElementException
ParserConfigurationException
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
IOException
com.mirth.connect.donkey.util.DonkeyElement.DonkeyElementException
ParserConfigurationException