The Delete Offer operation deletes the specified offer object.
Request
The Delete Offer request may be specified as
follows. Replace <offer-id>
with your offer
ID
Method | Request URI | HTTP Version |
---|---|---|
DELETE |
|
HTTP/1.1 |
URI Parameters
None.
Request Headers
The following table describes request headers.
Request Header | Description |
---|---|
Authorization |
Specifies the credentials for this request. The value of this header must be set Negotiate <token>. |
Request Body
None
Response
The response includes an HTTP status code, a set of response headers, and a response body.
Status Code
The status code is embedded in the response for this operation; if successful, it will be status code 200 (OK).
Response Headers
The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
Response Header | Description |
---|---|
None |
None |
Response Body
None.
Example
Delete an offer.
Copy Code | |
---|---|
public void DeleteOffer(string adminServiceEndpoint, string offername) { HttpClient httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("BASIC", Convert.ToBase64String(UnicodeEncoding.Unicode.GetBytes("AdminPortal:" + ”password”))))); string subscriptionEndpoint = adminServiceEndpoint + "offers/"+ offername; var response = httpClient.DeleteAsync(subscriptionEndpoint); var resultsStr = response.Result.Content.ReadAsStringAsync().Result; Console.WriteLine(resultsStr + "\n Successfully deleted Offer"); } |