public class MockHttpRequest extends BaseHttpRequest
Modifier and Type | Field and Description |
---|---|
protected ResteasyAsynchronousContext |
asynchronousContext |
protected Map<String,Object> |
attributes |
protected static URI |
EMPTY_URI |
protected ResteasyHttpHeaders |
httpHeaders |
protected String |
httpMethod |
protected InputStream |
inputStream |
decodedFormParameters, formParameters, uri
Modifier | Constructor and Description |
---|---|
protected |
MockHttpRequest() |
getDecodedFormParameters, getFormParameters, isInitial, setRequestUri, setRequestUri
protected ResteasyHttpHeaders httpHeaders
protected InputStream inputStream
protected String httpMethod
protected ResteasyAsynchronousContext asynchronousContext
protected static final URI EMPTY_URI
protected static MockHttpRequest initWithUri(String uri) throws URISyntaxException
URISyntaxException
public static MockHttpRequest create(String httpMethod, String uri) throws URISyntaxException
URISyntaxException
public static MockHttpRequest create(String httpMethod, URI uriObj, URI baseUri)
public static MockHttpRequest options(String uri) throws URISyntaxException
URISyntaxException
public static MockHttpRequest get(String uri) throws URISyntaxException
URISyntaxException
public static MockHttpRequest post(String uri) throws URISyntaxException
URISyntaxException
public static MockHttpRequest put(String uri) throws URISyntaxException
URISyntaxException
public static MockHttpRequest delete(String uri) throws URISyntaxException
URISyntaxException
public static MockHttpRequest head(String uri) throws URISyntaxException
URISyntaxException
public static MockHttpRequest deepCopy(HttpRequest request) throws IOException
IOException
public void setHttpMethod(String method)
public ResteasyAsynchronousContext getAsynchronousContext()
public void setAsynchronousContext(ResteasyAsynchronousContext asynchronousContext)
public MockHttpRequest header(String name, String value)
public MockHttpRequest accept(List<MediaType> accepts)
public MockHttpRequest accept(MediaType accept)
public MockHttpRequest accept(String type)
public MockHttpRequest language(String language)
public MockHttpRequest cookie(String name, String value)
public MockHttpRequest contentType(String type)
public MockHttpRequest contentType(MediaType type)
public MockHttpRequest content(byte[] bytes)
public MockHttpRequest content(InputStream stream)
public MockHttpRequest addFormHeader(String name, String value)
name
- form param namevalue
- form param valueMockHttpRequest
public HttpHeaders getHttpHeaders()
public MultivaluedMap<String,String> getMutableHeaders()
public InputStream getInputStream()
public void setInputStream(InputStream stream)
HttpRequest
stream
- input streampublic ResteasyUriInfo getUri()
HttpRequest
getUri
in interface HttpRequest
getUri
in class BaseHttpRequest
public String getHttpMethod()
public void initialRequestThreadFinished()
public Object getAttribute(String attribute)
HttpRequest
attribute
- attribute namepublic void removeAttribute(String name)
public Enumeration<String> getAttributeNames()
public ResteasyAsynchronousContext getAsyncContext()
public void forward(String path)
public boolean wasForwarded()
Copyright © 2019 JBoss by Red Hat. All rights reserved.