WebRequest to connect to the Wikipedia API

前端 未结 3 1744
北海茫月
北海茫月 2021-02-14 13:54

This may be a pathetically simple problem, but I cannot seem to format the post webrequest/response to get data from the Wikipedia API. I have posted my code below if anyone can

3条回答
  •  天命终不由人
    2021-02-14 14:17

    You seem to be pushing the input data on HTTP POST, but it seems you should use HTTP GET.

    From the MediaWiki API docs:

    The API takes its input through parameters in the query string. Every module (and every action=query submodule) has its own set of parameters, which is listed in the documentation and in action=help, and can be retrieved through action=paraminfo. http://www.mediawiki.org/wiki/API:Data_formats

提交回复
热议问题