-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
DotNET/Endpoint Examples/Multipart Payload/request-status.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Text; | ||
|
||
using (var httpClient = new HttpClient { BaseAddress = new Uri("https://api.pdfrest.com") }) | ||
{ | ||
string requestId = "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; // requestId to poll | ||
using (var request = new HttpRequestMessage(HttpMethod.Get, "request-status" + requestId)) | ||
{ | ||
request.Headers.TryAddWithoutValidation("Api-Key", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); | ||
|
||
var response = await httpClient.SendAsync(request); | ||
|
||
var apiResult = await response.Content.ReadAsStringAsync(); | ||
|
||
Console.WriteLine("API response received."); | ||
Console.WriteLine(apiResult); | ||
} | ||
} |