File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/test/java/com/wechat/pay/contrib/apache/httpclient Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 11package com .wechat .pay .contrib .apache .httpclient ;
22
3+ import static org .apache .http .HttpHeaders .ACCEPT ;
34import static org .apache .http .HttpStatus .SC_OK ;
5+ import static org .apache .http .entity .ContentType .APPLICATION_JSON ;
46import static org .junit .Assert .assertEquals ;
57import static org .junit .Assert .assertTrue ;
68
@@ -71,7 +73,7 @@ public void autoUpdateVerifierTest() {
7173 public void getCertificateTest () throws Exception {
7274 URIBuilder uriBuilder = new URIBuilder ("https://api.mch.weixin.qq.com/v3/certificates" );
7375 HttpGet httpGet = new HttpGet (uriBuilder .build ());
74- httpGet .addHeader ("Accept" , "application/json" );
76+ httpGet .addHeader (ACCEPT , APPLICATION_JSON . getMimeType () );
7577 CloseableHttpResponse response = httpClient .execute (httpGet );
7678 assertEquals (SC_OK , response .getStatusLine ().getStatusCode ());
7779 try {
You can’t perform that action at this time.
0 commit comments