JavaScript is disabled on your browser.
play.libs

Class WS.WSRequestHolder

  • Enclosing class:
    WS


    public static class WS.WSRequestHolder
    extends java.lang.Object
    provides the User facing API for building WS request.
    • Constructor Detail

      • WS.WSRequestHolder

        public WS.WSRequestHolder(java.lang.String url)
    • Method Detail

      • setHeader

        public WS.WSRequestHolder setHeader(java.lang.String name,
         java.lang.String value)
        Sets a header with the given name, this can be called repeatedly
        Parameters:
        name -
        value -
      • setQueryParameter

        public WS.WSRequestHolder setQueryParameter(java.lang.String name,
         java.lang.String value)
        Sets a query parameter with the given name,this can be called repeatedly
        Parameters:
        name -
        value -
      • setAuth

        public WS.WSRequestHolder setAuth(java.lang.String username,
         java.lang.String password)
        Sets the authentication header for the current request using BASIC authentication.
        Parameters:
        username -
        password -
      • setAuth

        public WS.WSRequestHolder setAuth(java.lang.String username,
         java.lang.String password,
         com.ning.http.client.Realm.AuthScheme scheme)
        Sets the authentication header for the current request.
        Parameters:
        username -
        password -
        scheme - authentication scheme
      • setFollowRedirects

        public WS.WSRequestHolder setFollowRedirects(java.lang.Boolean followRedirects)
        Sets whether redirects (301, 302) should be followed automatically
        Parameters:
        followRedirects -
      • setTimeout

        public WS.WSRequestHolder setTimeout(int timeout)
        Sets the request timeout in milliseconds
        Parameters:
        timeout -
      • setContentType

        public WS.WSRequestHolder setContentType(java.lang.String contentType)
        Set the content type. If the request body is a String, and no charset parameter is included, then it will default to UTF-8.
        Parameters:
        contentType - The content type
      • post

        public F.Promise<WS.Response> post(java.lang.String body)
        Perform a POST on the request asynchronously.
        Parameters:
        body - represented as String
      • put

        public F.Promise<WS.Response> put(java.lang.String body)
        Perform a PUT on the request asynchronously.
        Parameters:
        body - represented as String
      • post

        public F.Promise<WS.Response> post(org.codehaus.jackson.JsonNode body)
        Perform a POST on the request asynchronously.
        Parameters:
        body - represented as JSON
      • put

        public F.Promise<WS.Response> put(org.codehaus.jackson.JsonNode body)
        Perform a PUT on the request asynchronously.
        Parameters:
        body - represented as JSON
      • post

        public F.Promise<WS.Response> post(java.io.InputStream body)
        Perform a POST on the request asynchronously.
        Parameters:
        body - represented as an InputStream
      • put

        public F.Promise<WS.Response> put(java.io.InputStream body)
        Perform a PUT on the request asynchronously.
        Parameters:
        body - represented as an InputStream
      • post

        public F.Promise<WS.Response> post(java.io.File body)
        Perform a POST on the request asynchronously.
        Parameters:
        body - represented as a File
      • put

        public F.Promise<WS.Response> put(java.io.File body)
        Perform a PUT on the request asynchronously.
        Parameters:
        body - represented as a File
      • execute

        public F.Promise<WS.Response> execute(java.lang.String method)
        Execute an arbitrary method on the request asynchronously.
        Parameters:
        method - The method to execute

AltStyle によって変換されたページ (->オリジナル) /