/// <summary> /// Initiates the asynchronous execution of the TestBlobPayload operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the TestBlobPayload operation on AmazonRestJsonTestClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndTestBlobPayload /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/test-2021-05-13/TestBlobPayload">REST API Reference for TestBlobPayload Operation</seealso> public virtual IAsyncResult BeginTestBlobPayload(TestBlobPayloadRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = TestBlobPayloadRequestMarshaller.Instance; options.ResponseUnmarshaller = TestBlobPayloadResponseUnmarshaller.Instance; return(BeginInvoke(request, options, callback, state)); }
/// <summary> /// Post a test blob payload request. /// </summary> /// <param name="request">Container for the necessary parameters to execute the TestBlobPayload service method.</param> /// /// <returns>The response from the TestBlobPayload service method, as returned by RestJsonTest.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/test-2021-05-13/TestBlobPayload">REST API Reference for TestBlobPayload Operation</seealso> public virtual TestBlobPayloadResponse TestBlobPayload(TestBlobPayloadRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = TestBlobPayloadRequestMarshaller.Instance; options.ResponseUnmarshaller = TestBlobPayloadResponseUnmarshaller.Instance; return(Invoke <TestBlobPayloadResponse>(request, options)); }
/// <summary> /// Post a test blob payload request. /// </summary> /// <param name="request">Container for the necessary parameters to execute the TestBlobPayload service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the TestBlobPayload service method, as returned by RestJsonTest.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/test-2021-05-13/TestBlobPayload">REST API Reference for TestBlobPayload Operation</seealso> public virtual Task <TestBlobPayloadResponse> TestBlobPayloadAsync(TestBlobPayloadRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = TestBlobPayloadRequestMarshaller.Instance; options.ResponseUnmarshaller = TestBlobPayloadResponseUnmarshaller.Instance; return(InvokeAsync <TestBlobPayloadResponse>(request, options, cancellationToken)); }
public void TestEmptyBlobPayloadTest() { var request = new TestBlobPayloadRequest(); var marshaller = new TestBlobPayloadRequestMarshaller(); var internalRequest = marshaller.Marshall(request); Assert.IsFalse(internalRequest.Headers.ContainsKey("Content-Type")); Assert.IsNull(internalRequest.Content); }
public void TestBlobPayloadTest() { var request = new TestBlobPayloadRequest(); request.Data = new System.IO.MemoryStream(new byte[] { 1, 2, 3, 4 }); request.ContentType = "image/jpg"; var marshaller = new TestBlobPayloadRequestMarshaller(); var internalRequest = marshaller.Marshall(request); Assert.IsTrue(internalRequest.Headers.ContainsKey("Content-Type")); Assert.IsTrue(internalRequest.Headers["Content-Type"] == "image/jpg"); }