Closed ipeirotis closed 11 years ago
This is a Mashape problem, which does not create the proper URL call.
For example, when I put Hillary Clinton, it generates the following CURL call:
curl -i -X GET "https://wikisynonyms.p.mashape.com/term?term=hillary%20clinton" \ -H "X-Mashape-Authorization: YXJpbzJ4dXkzZXR5cms4MDB2NTdpY3NpdnMyY25yOjg5YjU3OWY1M2E1MGEyNjRjZjY2ZjMzZWIzYTFlMDY1NDViYTc0ZTE="
For some strange reason, the C++ "works" through the "Test Endpoint", but the CURL call that Mashape gives will not work properly when executed in a shell:
curl -i -X GET "https://wikisynonyms.p.mashape.com/term?term=C++" \ -H "X-Mashape-Authorization: YXJpbzJ4dXkzZXR5cms4MDB2NTdpY3NpdnMyY25yOjg5YjU3OWY1M2E1MGEyNjRjZjY2ZjMzZWIzYTFlMDY1NDViYTc0ZTE="
returns
{"http":300,"message":"The entry is a disambiguation page in Wikipedia. Please query again with one of the returned terms","terms":["Academic term","Contractual term","Easter term","Full term","Ground term","Lent term","Maxterms","Michaelmas term","Minterms","Technical term","Term (architecture)","Term (computers)","Term (logic)","Term (mathematics)","Term (time)","Term algebra","Term logic","Term of office","Term of patent","Term symbol","Terme (disambiguation)","Termeh","Terminology","Tern (disambiguation)","United States midterm election"]}
Had a small issue with c++ or c%2B%2B indeed due to a routing bug. ---->fixed it! Though in your examples the requests are WRONG!!! :-) Try:
$ curl -i -X GET "https://wikisynonyms.p.mashape.com/C++" -H "X-Mashape-Authorization: YXJpbzJ4dXkzZXR5cms4MDB2NTdpY3NpdnMyY25yOjg5YjU3OWY1M2E1MGEyNjRjZjY2ZjMzZWIzYTFlMDY1NDViYTc0ZTE="
Returns:
HTTP/1.1 200 OK content-type: application/json date: Mon, 21 Jan 2013 15:04:51 GMT server: Apache/2.2.23 (Amazon) X-Mashape-Version: 2.4.8 x-powered-by: PHP/5.3.19 Content-Length: 607 Connection: keep-alive
{"http":200,"message":"success","terms":["C++","C plus plus programming language","C Plus Plus programming language","Cplusplus","ISO\/IEC 14882","CPlusPlus","C with classes","C-plus-plus programming language","C Plus Plus","C plus plus","C-plus-plus","C==","C++ (programming language)","C++ programming language","ISO\/IEC 14882:2003","C++ syntax","Cee plus plus","Cee Plus Plus","++C","ISO 14882","Cxx",".cxx","ANSI C++","C++98","C+++","Criticism of C++","ISO C++ programming language","Gxavo","Export (C++)","ISO C++","C ....
And
curl -i -X GET "https://wikisynonyms.p.mashape.com/Hillary%20Clinton" -H "X-Mashape-Authorization: YXJpbzJ4dXkzZXR5cms4MDB2NTdpY3NpdnMyY25yOjg5YjU3OWY1M2E1MGEyNjRjZjY2ZjMzZWIzYTFlMDY1NDViYTc0ZTE="
Returns:
HTTP/1.1 200 OK content-type: application/json date: Mon, 21 Jan 2013 15:06:30 GMT server: Apache/2.2.23 (Amazon) X-Mashape-Version: 2.4.8 x-powered-by: PHP/5.3.19 Content-Length: 1601 Connection: keep-alive
{"http":200,"message":"success","terms":["Hillary Rodham Clinton","Hillary R. Clinton","Hilary clinton","Hilary Clinton","HIllary Rodham Clinton","Hillary Rodham","Clinton, Hillary Rodham","Senator Clinton","Hillary Rodham Clinton controversies","Cultural matters related to Hillary Rodham Clinton","Controversies surrounding Hillary Clinton","Cultural Matters of Hillary Clinton","Senator Hillary Rodham Clinton","Controversies surrounding Hillary Rodham Clinton","Hilary Rodham Clinton","Hillary Diane Rodham Clinton","Hillery Clinton","Hillary Diane Rodham Clinotn","Hilliary Clinton","Hillary Diane Clinton","Hillary Diane Rodham","Hillary Cliton","Hillary clinton","List of Hillary Rodham Clinton Controversies","Hillary D. R. Clinton","Hillary Diane R. Clinton","HR Clinton","Rodham Clinton","Mrs. Clinton","Ms. Clinton","Mrs Clinton","Hilary Rodham","Hillary Rodham-Clinton","HillaryRodhamClinton","HilaryRodhamClinton","Hillary-Rodham-Clinton","RodhamClinton","Rodham-Clinton","HillaryRodham","Clinton, Hillary","Hillary-Rodham","Ms. Rodham","Clinton Rodham","Rodham, Hillary","Rodham Hillary","Ms Rodham","MsRodham","Ms.Rodham","Miss Rodham","MissRodham","Hillary Clinton-Rodham","Clinton, Rodham","Clinton-Rodham","Rodham,Hillary","Hillary Rodham Clintion","H Clinton","Hillary Diane","Senator Hillary Clinton","Rodham, Hillary Diane","Hillary Clinton","Clinton hillary","Mrs. Bill Clinton","Mrs Bill Clinton","Hillary Rodham Klinton","Hillary Klinton","Secretary of State Hillary Clinton","H.R. Clinton","Secretary Clinton","H. Clinton","Public image of Hillary clinton","Hillery clinton"]}
C++ creates a redirect result (which ignores the ++)
Hillary Clinton generates an error