org.springframework.cloud.dataflow.shell.command

## Class HttpCommands

- java.lang.Object
- - org.springframework.cloud.dataflow.shell.command.HttpCommands

- All Implemented Interfaces:
    org.springframework.shell.core.CommandMarker

      @Component
      public class HttpCommands
      extends Object
      implements org.springframework.shell.core.CommandMarker

  Http commands.
  Author:
    Jon Brisbin, Ilayaperumal Gopinathan, Gunnar Hillert, Eric Bottard, David Turanski

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpCommands()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getHttp(String target, String targetUsername, String targetPassword, boolean skipSslValidation)`
    `String` | `postHttp(String target, String data, File file, org.springframework.http.MediaType mediaType, String targetUsername, String targetPassword, boolean skipSslValidation)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HttpCommands

          public HttpCommands()

  - ### Method Detail

    - #### postHttp

          @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:9393")
                                                                                                               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")
                                                                                                               org.springframework.http.MediaType mediaType,
                                                                                                               @CliOption(mandatory=false,key="username",help="the username for calls that require basic authentication",unspecifiedDefaultValue="")
                                                                                                               String targetUsername,
                                                                                                               @CliOption(mandatory=false,key="password",help="the password for calls that require basic authentication",specifiedDefaultValue="",unspecifiedDefaultValue="__NULL__")
                                                                                                               String targetPassword,
                                                                                                               @CliOption(mandatory=false,key="skip-ssl-validation",help="accept any SSL certificate (even self-signed)",specifiedDefaultValue="true",unspecifiedDefaultValue="false")
                                                                                                               boolean skipSslValidation)
                                                                                                        throws IOException

      Throws:
        `IOException`

    - #### getHttp

          @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,
                                                                                                                    @CliOption(mandatory=false,key="username",help="the username for calls that require basic authentication",unspecifiedDefaultValue="")
                                                                                                                    String targetUsername,
                                                                                                                    @CliOption(mandatory=false,key="password",help="the password for calls that require basic authentication",specifiedDefaultValue="",unspecifiedDefaultValue="__NULL__")
                                                                                                                    String targetPassword,
                                                                                                                    @CliOption(mandatory=false,key="skip-ssl-validation",help="accept any SSL certificate (even self-signed)",specifiedDefaultValue="true",unspecifiedDefaultValue="false")
                                                                                                                    boolean skipSslValidation)
                                                                                                             throws IOException

      Throws:
        `IOException`

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.