question

swankymajor avatar image
0 Likes"
swankymajor asked

POST-ORDER API Response with Code

Hi Trying to get the post-order api talking to me but it isn't sending back a response object. Just seems to send me a 'Page not responding' in the content. any ideas why please? Code below: ResponseStatusCode: 200 Status:OK Status: RanToCompletion PageNotResponding : http://pages.ebay.com/messages/page_not_responding.html public async Task CancelOrderChk() { using (var client = new HttpClient()) { var values = new Dictionary { {"legacyOrderId", "xxx-xxx"} }; var content = new FormUrlEncodedContent(values); client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json"); client.DefaultRequestHeaders.Add("Authorization", "TOKEN [xxx-My Token-xxx]"); client.DefaultRequestHeaders.Add("X-EBAY-C-MARKETPLACE-ID", "EBAY-UK"); var response = await client.PostAsJsonAsync(" https://api.ebay.com/post-order/v2/cancellation/check_eligibility", content); var res = response.Content.ReadAsStringAsync().Result; return res; } }
c#
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.