简体   繁体   English

如何从命令行测试HTTPS Rest

[英]How to test HTTPS rest from command line

I'm having a problem I can't seem to solve on my own: I have to request RESTful services but the RESTful services use HTTPs protocol. 我遇到了一个我似乎无法自行解决的问题:我必须请求RESTful服务,但RESTful服务使用HTTPs协议。 I've created the client and it is deployed in WebLogic 我已经创建了客户端,并将其部署在WebLogic中

I've downloaded the certificate using the browser and I've installed it in JAVA using the following command (In my linux server): "keytool -import -alias myalias -keystore /jdk1.8.0_101/jre/lib/security/cacerts -file certificado.com.crt" 我已经使用浏览器下载了证书,并已使用以下命令在Linux中将其安装在JAVA中:“ keytool -import -alias myalias -keystore /jdk1.8.0_101/jre/lib/security/cacerts文件certificado.com.crt”

I need to test that it works... First, How can I test the RESTful services from command line? 我需要测试它是否有效...首先,如何从命令行测试RESTful服务? Second, Do I need to install the certificate in WebLogic? 其次,是否需要在WebLogic中安装证书? If yes, How can I do it? 如果是,我该怎么办?

JAVA: jdk1.8.0_101 WebLogic: 12.1.3.0.0 JAVA:jdk1.8.0_101 WebLogic:12.1.3.0.0

The certificate must be installed on the system that's making the request. 证书必须安装在发出请求的系统上。 It's not about weblogic, it's about the local sertificate vault of the machine. 这与weblogic无关,而与计算机的本地证书库有关。 You don't need to install the certificate on weblogic. 您无需在weblogic上安装证书。 You may want to take a look at this . 您可能想看看这个

Then you can use wget or curl , just keep in mind that wget just makes get requests while curl do all types of requests. 然后您可以使用wgetcurl ,只要记住wget会发出get请求,而curl会执行所有类型的请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM