Package com.atlan.net
Class AtlanRequest
java.lang.Object
com.atlan.net.AtlanRequest
A request to Atlan's API.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionAtlanRequest(AtlanClient client, ApiResource.RequestMethod method, String url, InputStream file, String filename, Map<String, String> extras, RequestOptions options, String requestId) Initializes a new instance of theAtlanRequestclass, used specifically for uploading files (images).AtlanRequest(AtlanClient client, ApiResource.RequestMethod method, String url, String body, RequestOptions options, String requestId) Initializes a new instance of theAtlanRequestclass, used for the majority of requests.AtlanRequest(AtlanClient client, ApiResource.RequestMethod method, String url, String body, RequestOptions options, String requestId, String acceptType) Initializes a new instance of theAtlanRequestclass, used for the majority of requests.AtlanRequest(AtlanClient client, ApiResource.RequestMethod method, String url, Map<String, Object> map, RequestOptions options, String requestId) Initializes a new instance of theAtlanRequestclass, used specifically for exchanging form-urlencoded content.protectedAtlanRequest(AtlanClient client, ApiResource.RequestMethod method, URL url, HttpContent content, HttpHeaders headers, String body, RequestOptions options, String requestId) -
Method Summary
Modifier and TypeMethodDescriptionbody()The body of the request (as an unmodifiable JSON string).client()Connectivity to the Atlan tenant.content()The body of the request.booleaninthashCode()headers()The HTTP headers of the request (Authorization,Atlan-Version,Atlan-Account,Idempotency-Key...).method()The HTTP method for the request (GET, POST or DELETE).options()The special modifiers of the request.Unique identifier (GUID) of this request.toString()url()The URL for the request.
-
Constructor Details
-
AtlanRequest
public AtlanRequest(AtlanClient client, ApiResource.RequestMethod method, String url, String body, RequestOptions options, String requestId) throws AtlanException Initializes a new instance of theAtlanRequestclass, used for the majority of requests.- Parameters:
client- connectivity to an Atlan tenantmethod- the HTTP methodurl- the URL of the requestbody- the body of the requestoptions- the special modifiers of the requestrequestId- unique identifier (GUID) of a single request to Atlan- Throws:
AtlanException- if the request cannot be initialized for any reason
-
AtlanRequest
public AtlanRequest(AtlanClient client, ApiResource.RequestMethod method, String url, String body, RequestOptions options, String requestId, String acceptType) throws AtlanException Initializes a new instance of theAtlanRequestclass, used for the majority of requests.- Parameters:
client- connectivity to an Atlan tenantmethod- the HTTP methodurl- the URL of the requestbody- the body of the requestoptions- the special modifiers of the requestrequestId- unique identifier (GUID) of a single request to AtlanacceptType- mime-type for the content accepted in the response to this query- Throws:
AtlanException- if the request cannot be initialized for any reason
-
AtlanRequest
public AtlanRequest(AtlanClient client, ApiResource.RequestMethod method, String url, InputStream file, String filename, Map<String, String> extras, RequestOptions options, String requestId) throws AtlanExceptionInitializes a new instance of theAtlanRequestclass, used specifically for uploading files (images).- Parameters:
client- connectivity to an Atlan tenantmethod- the HTTP methodurl- the URL of the requestfile- the file to be uploaded through the requestfilename- name of the file the InputStream is readingextras- (optional) additional form-encoded parameters to sendoptions- the special modifiers of the requestrequestId- unique identifier (GUID) of a single request to Atlan- Throws:
AtlanException- if the request cannot be initialized for any reason
-
AtlanRequest
public AtlanRequest(AtlanClient client, ApiResource.RequestMethod method, String url, Map<String, Object> map, RequestOptions options, String requestId) throws AtlanExceptionInitializes a new instance of theAtlanRequestclass, used specifically for exchanging form-urlencoded content.- Parameters:
client- connectivity to an Atlan tenantmethod- the HTTP methodurl- the URL of the requestmap- of key-value pairs to be form-urlencodedoptions- the special modifiers of the requestrequestId- unique identifier (GUID) of a single request to Atlan- Throws:
AtlanException- if the request cannot be initialized for any reason
-
AtlanRequest
protected AtlanRequest(AtlanClient client, ApiResource.RequestMethod method, URL url, HttpContent content, HttpHeaders headers, String body, RequestOptions options, String requestId)
-
-
Method Details
-
client
Connectivity to the Atlan tenant. -
method
The HTTP method for the request (GET, POST or DELETE). -
url
The URL for the request. If this is a GET or DELETE request, the URL also includes the request parameters in its query string. -
content
The body of the request. For POST requests, this will be either aapplication/jsonpayload or a multi-part form upload (for files). For GET requests, this will benull. -
headers
The HTTP headers of the request (Authorization,Atlan-Version,Atlan-Account,Idempotency-Key...). -
body
The body of the request (as an unmodifiable JSON string). -
options
The special modifiers of the request. -
requestId
Unique identifier (GUID) of this request. -
equals
-
hashCode
public int hashCode() -
toString
-