Click here to Skip to main content
16,004,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
When I am trying to add third party web API reference to my web application. it throws the error like this...


There was an error downloading 'http://www.abcd.com/api/test/getdetails/$metadata'. The request failed with HTTP status 400: Bad Request.

What I have tried:

In Solution Explorer, Right click References and choose Add Service Reference then choose Advanced option,then add Web Reference. Paste my API URL in URL and press enter.. it shows like this..

Web services found at this URL :
There was an error downloading 'http://www.abcd.com/api/test/getdetails/$metadata'.
The request failed with HTTP status 400: Bad Request.
Posted
Updated 2-Aug-18 3:18am

1 solution

400 Bad Request - HTTP | MDN[^]:
Quote:
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server could not understand the request due to invalid syntax.
In your case it might be sourced by the dollar sign. Try this instead:
http://www.abcd.com/api/test/getdetails/%24metadata

If that does not help contact the web site's administrator.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900