https://api.xxxc.xx/xxxxxx/w.php
Request: GET
Request code: interface: charset parameters: UTF8/GBK (must be capitalized, the default UTF8)
Request parameters: interface: code parameters: js (null returns plain text)
Trouble, had better have source reference, thank you thank you!
CodePudding user response:
Use okhttp or volley, or their asynchronous invocation HttpURLConnectionCodePudding user response:
Recommend a learning website play androidCodePudding user response:
The same guy, either PHP or what, all the same, I can give you a request of toolsCodePudding user response:
The String url=address;ArrayList
//add the header parameter. According to the condition of their fixed
Header. The add (new ApiOkHttpClient. HeaderEntity (" the content-type ", "application/octet - stream"));
//add a token, don't need to add to format your fill out
The header. The add (new ApiOkHttpClient. HeaderEntity (" Authorization ", "Basic" + User. ShareUser () getToken ()));
ApiOkHttpClient. ShareClient (). The Get (url, headers, this new ApiOkHttpClient. MyNetCall () {
@ Override
Public void success (Response Response) throws IOException {
If (the response code ()==200) {
//return to normal processing
}
@ Override
Public void failed (IOException e) {
//error return processing
}
});
CodePudding user response:
Utility classCopy this paragraph after open the baidu network backup phone App, operation more convenient oh links: https://pan.baidu.com/s/13DELXXl1ukXxz1ixIjuWlw extraction code: 2 co9