1 package com.atlassian.sal.api.net;
2
3 /**
4 * Factory to create {@link TrustedRequest}s. Requests are used to make network calls, using Trusted Apps authentication.
5 *
6 * The rest plugin provides the default implementation for this interface.
7 *
8 * @param <T> The type of request to create
9 *
10 * @since 3.0.0
11 **/
12 public interface TrustedRequestFactory<T extends TrustedRequest<?, ?>> extends RequestFactory
13 {
14 /**
15 * Creates a request of given {@link com.atlassian.sal.api.net.Request.MethodType} to given url.
16 * Wraps the request in Trusted Apps authentication.
17 *
18 * @param methodType
19 * @param url
20 * @return
21 */
22 T createTrustedRequest(final Request.MethodType methodType, final String url);
23 }