| | |
| | | |
| | | public class DescribeInstances { |
| | | |
| | | public static AddressDto ocr(String address){ |
| | | public static JSONObject ocr(String address){ |
| | | |
| | | String host = "https://addre.market.alicloudapi.com"; |
| | | String path = "/format"; |
| | | String method = "GET"; |
| | | String appcode = "44145c4c95004841985608a86eb4a4b7"; |
| | | String appcode = "0efeed6a5fe94240b143fec8910c5053"; |
| | | Map<String, String> headers = new HashMap<String, String>(); |
| | | //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105 |
| | | headers.put("Authorization", "APPCODE " + appcode); |
| | |
| | | addressDto.setAddress(address1); |
| | | addressDto.setName(person1); |
| | | addressDto.setPhone(phonenum1); |
| | | return addressDto; |
| | | return data; |
| | | //获取response的body |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return new AddressDto(); |
| | | return new JSONObject(); |
| | | |
| | | } |
| | | public static AddressDto orcr(String args) { |