1 package com.atlassian.security.auth.trustedapps.request.commonshttpclient;
2
3 import com.atlassian.security.auth.trustedapps.request.TrustedRequest;
4 import org.apache.commons.httpclient.HttpMethod;
5
6
7
8
9 public class CommonsHttpClientTrustedRequest implements TrustedRequest
10 {
11 private final HttpMethod httpMethod;
12
13 public CommonsHttpClientTrustedRequest(final HttpMethod httpMethod)
14 {
15 if (httpMethod == null)
16 {
17 throw new IllegalArgumentException("HttpMethod must not be null!");
18 }
19 this.httpMethod = httpMethod;
20 }
21
22 public void addRequestParameter(String name, String value)
23 {
24 httpMethod.addRequestHeader(name, value);
25 }
26 }