use of com.reprezen.kaizen.oasparser.model3.RequestBody in project org.hl7.fhir.core by hapifhir.
the class Client method postBatchRequest.
public Bundle postBatchRequest(URI resourceUri, byte[] payload, String resourceFormat, String message, int timeout) throws IOException {
if (payload == null)
throw new EFhirClientException("POST requests require a non-null payload");
RequestBody body = RequestBody.create(MediaType.parse(resourceFormat + ";charset=" + DEFAULT_CHARSET), payload);
Request.Builder request = new Request.Builder().url(resourceUri.toURL()).post(body);
return executeBundleRequest(request, resourceFormat, new Headers.Builder().build(), message, retryCount, timeout);
}
use of com.reprezen.kaizen.oasparser.model3.RequestBody in project org.hl7.fhir.core by hapifhir.
the class Client method issuePostRequest.
public <T extends Resource> ResourceRequest<T> issuePostRequest(URI resourceUri, byte[] payload, String resourceFormat, Headers headers, String message, long timeout) throws IOException {
if (payload == null)
throw new EFhirClientException("POST requests require a non-null payload");
this.payload = payload;
RequestBody body = RequestBody.create(MediaType.parse(resourceFormat + ";charset=" + DEFAULT_CHARSET), payload);
Request.Builder request = new Request.Builder().url(resourceUri.toURL()).post(body);
return executeFhirRequest(request, resourceFormat, headers, message, retryCount, timeout);
}
use of com.reprezen.kaizen.oasparser.model3.RequestBody in project org.hl7.fhir.core by hapifhir.
the class Client method issuePostRequest.
public <T extends Resource> ResourceRequest<T> issuePostRequest(URI resourceUri, byte[] payload, String resourceFormat, Headers headers, String message, long timeout) throws IOException {
if (payload == null)
throw new EFhirClientException("POST requests require a non-null payload");
this.payload = payload;
RequestBody body = RequestBody.create(MediaType.parse(resourceFormat + ";charset=" + DEFAULT_CHARSET), payload);
Request.Builder request = new Request.Builder().url(resourceUri.toURL()).post(body);
return executeFhirRequest(request, resourceFormat, headers, message, retryCount, timeout);
}
use of com.reprezen.kaizen.oasparser.model3.RequestBody in project org.hl7.fhir.core by hapifhir.
the class Client method issuePutRequest.
public <T extends Resource> ResourceRequest<T> issuePutRequest(URI resourceUri, byte[] payload, String resourceFormat, Headers headers, String message, long timeout) throws IOException {
if (payload == null)
throw new EFhirClientException("PUT requests require a non-null payload");
this.payload = payload;
RequestBody body = RequestBody.create(payload);
Request.Builder request = new Request.Builder().url(resourceUri.toURL()).put(body);
return executeFhirRequest(request, resourceFormat, headers, message, retryCount, timeout);
}
use of com.reprezen.kaizen.oasparser.model3.RequestBody in project org.hl7.fhir.core by hapifhir.
the class Client method postBatchRequest.
public Bundle postBatchRequest(URI resourceUri, byte[] payload, String resourceFormat, Headers headers, String message, int timeout) throws IOException {
if (payload == null)
throw new EFhirClientException("POST requests require a non-null payload");
RequestBody body = RequestBody.create(MediaType.parse(resourceFormat + ";charset=" + DEFAULT_CHARSET), payload);
Request.Builder request = new Request.Builder().url(resourceUri.toURL()).post(body);
return executeBundleRequest(request, resourceFormat, headers, message, retryCount, timeout);
}
Aggregations