HttpApi
Keywords: net.corda.testing.http.HttpApi class
Date: 2023-09-18

net.corda.testing.http

## Class HttpApi

- net.corda.testing.http.HttpApi

-     public class HttpApi

- - ### Field Detail

    - #### Companion

          public static net.corda.testing.http.HttpApi.Companion Companion

  - ### Constructor Detail

    - #### HttpApi

          public HttpApi(@NotNull
                         java.net.URL root,
                         @NotNull
                         com.fasterxml.jackson.databind.ObjectMapper mapper)

  - ### Method Detail

    - #### putJson

          public void putJson(@NotNull
                              java.lang.String path,
                              @NotNull
                              java.lang.Object data)

      Send a PUT with a payload to the path on the API specified.

      Parameters:
        `data` - String values are assumed to be valid JSON. All other values will be mapped to JSON.

    - #### postJson

          public void postJson(@NotNull
                               java.lang.String path,
                               @NotNull
                               java.lang.Object data)

      Send a POST with a payload to the path on the API specified.

      Parameters:
        `data` - String values are assumed to be valid JSON. All other values will be mapped to JSON.

    - #### postPlain

          public void postPlain(@NotNull
                                java.lang.String path,
                                @NotNull
                                java.lang.String data)

      Send a POST with a payload to the path on the API specified.

      Parameters:
        `data` - String payload

    - #### getRoot

          @NotNull
          public java.net.URL getRoot()

    - #### getMapper

          @NotNull
          public com.fasterxml.jackson.databind.ObjectMapper getMapper()