@Component public class HttpCommands extends Object implements CommandMarker
Constructor and Description |
---|
HttpCommands() |
@CliCommand(value="http post", help="POST data to http endpoint") public String postHttp(@CliOption(mandatory=false,key={"","target"},help="the location to post to",unspecifiedDefaultValue="http://localhost:9000") String target, @CliOption(mandatory=false,key="data",help="the text payload to post. exclusive with file. embedded double quotes are not supported if next to a space character") String data, @CliOption(mandatory=false,key="file",help="filename to read data from. exclusive with data") File file, @CliOption(mandatory=false,key="contentType",help="the content-type to use. file is also read using the specified charset",unspecifiedDefaultValue="text/plain; Charset=UTF-8") MediaType mediaType) throws IOException
IOException
@CliCommand(value="http get", help="Make GET request to http endpoint") public String getHttp(@CliOption(mandatory=false,key={"","target"},help="the URL to make the request to",unspecifiedDefaultValue="http://localhost:9393") String target) throws IOException
IOException
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.