Class Post

  • All Implemented Interfaces:
    AutoCloseable

    public class Post
    extends RESTCall<org.apache.http.client.methods.HttpPost>
    Author:
    Erik van Zijst
    • Constructor Detail

      • Post

        public Post​(@NotNull
                    @NotNull org.apache.http.client.HttpClient client,
                    @NotNull
                    @NotNull String url)
      • Post

        public Post​(@NotNull
                    @NotNull String url)
    • Method Detail

      • setRequestBody

        public void setRequestBody​(byte[] raw,
                                   org.apache.http.entity.ContentType contentType)
        Sets the request body to the specified raw byte array.
        Parameters:
        raw -
        contentType -
      • setRequestObject

        public void setRequestObject​(Object obj)
                              throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • setRequestEntity

        public void setRequestEntity​(org.apache.http.HttpEntity requestEntity)
      • beforeExecute

        protected void beforeExecute()
        Overrides:
        beforeExecute in class RESTCall<org.apache.http.client.methods.HttpPost>
      • addParam

        public void addParam​(String name,
                             String value)