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

com.confluex.mule.test.http.ClientRequest.groovy Maven / Gradle / Ivy

There is a newer version: 0.4.3
Show newest version
package com.confluex.mule.test.http

import groovy.transform.ToString

import javax.servlet.http.HttpServletRequest

@ToString(includeNames=true)
class ClientRequest {
    Map headers = [:]
    String contentType
    String body
    String method
    String url

    ClientRequest(HttpServletRequest request) {
        this.method = request.method
        this.contentType = request.contentType
        this.body = request.inputStream?.text
        this.url = request.requestURL.toString()
        request.headerNames.each { String name ->
            headers[name] = request.getHeader(name)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy