alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Play Framework/Scala example source code file (WSRequestHolder.java)

This example Play Framework source code file (WSRequestHolder.java) is included in my "Source Code Warehouse" project. The intent of this project is to help you more easily find Play Framework (and Scala) source code examples by using tags.

All credit for the original source code belongs to Play Framework; I'm just trying to make examples easier to find. (For my Scala work, see my Scala examples and tutorials.)

Play Framework tags/keywords

boolean, collection, lib, library, map, play, play framework, string, web service, ws, wsauthscheme, wsrequestholder, wssignaturecalculator

The WSRequestHolder.java Play Framework example source code

/*
 * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
 */
package play.libs.ws;


import com.fasterxml.jackson.databind.JsonNode;
import play.libs.F;

import java.io.File;
import java.io.InputStream;
import java.util.Collection;
import java.util.Map;

public interface WSRequestHolder {

    String getUsername();

    String getPassword();

    WSAuthScheme getScheme();

    WSSignatureCalculator getCalculator();

    int getTimeout();

    Boolean getFollowRedirects();

    F.Promise<WSResponse> get();

    F.Promise<WSResponse> patch(String body);

    F.Promise<WSResponse> post(String body);

    F.Promise<WSResponse> put(String body);

    F.Promise<WSResponse> patch(JsonNode body);

    F.Promise<WSResponse> post(JsonNode body);

    F.Promise<WSResponse> put(JsonNode body);

    F.Promise<WSResponse> patch(InputStream body);

    F.Promise<WSResponse> post(InputStream body);

    F.Promise<WSResponse> put(InputStream body);

    F.Promise<WSResponse> post(File body);

    F.Promise<WSResponse> put(File body);

    F.Promise<WSResponse> delete();

    F.Promise<WSResponse> head();

    F.Promise<WSResponse> options();

    F.Promise<WSResponse> execute(String method);

    /**
     * Execute the request
     */
    F.Promise<WSResponse> execute();

    /**
     * Set the method this request should use.
     */
    WSRequestHolder setMethod(String method);

    /**
     * Set the body this request should use
     */
    WSRequestHolder setBody(String body);

    /**
     * Set the body this request should use
     */
    WSRequestHolder setBody(JsonNode body);

    /**
     * Set the body this request should use
     */
    WSRequestHolder setBody(InputStream body);

    /**
     * Set the body this request should use
     */
    WSRequestHolder setBody(File body);

    WSRequestHolder setHeader(String name, String value);

    WSRequestHolder setQueryString(String query);

    WSRequestHolder setQueryParameter(String name, String value);

    WSRequestHolder setAuth(String userInfo);

    WSRequestHolder setAuth(String username, String password);

    WSRequestHolder setAuth(String username, String password, WSAuthScheme scheme);

    WSRequestHolder sign(WSSignatureCalculator calculator);

    WSRequestHolder setFollowRedirects(Boolean followRedirects);

    WSRequestHolder setVirtualHost(String virtualHost);

    WSRequestHolder setTimeout(int timeout);

    WSRequestHolder setContentType(String contentType);

    String getUrl();

    Map<String, Collection<String>> getHeaders();

    Map<String, Collection<String>> getQueryParameters();
}

Other Play Framework source code examples

Here is a short list of links related to this Play Framework WSRequestHolder.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.