Tabnine Logo
HttpRequest.setInternalRequest
Code IndexAdd Tabnine to your IDE (free)

How to use
setInternalRequest
method
in
org.apache.shindig.gadgets.http.HttpRequest

Best Java code snippets using org.apache.shindig.gadgets.http.HttpRequest.setInternalRequest (Showing top 6 results out of 315)

origin: org.apache.shindig/shindig-gadgets

sb.append( "&st=" ).append( codec.encodeToken( token ));
Uri url = Uri.parse(sb.toString());
HttpRequest request = new HttpRequest(url).setInternalRequest(true);
origin: org.apache.shindig/shindig-gadgets

lastLoadTryMs = now;
try {
 HttpRequest request = new HttpRequest(uri).setInternalRequest(true);
 HttpResponse response = fetcher.fetch(request);
 if (response.getHttpStatusCode() == HttpResponse.SC_OK) {
origin: org.apache.shindig/shindig-gadgets

public FetchedData fetch(ExternalReference ref, String mimeType)
  throws UriFetchException {
 if (LOG.isLoggable(Level.INFO)) {
  LOG.logp(Level.INFO, CLASS_NAME, "makeFetcher", MessageKeys.RETRIEVE_REFERENCE,
    new Object[] {ref.toString()});
 }
 Uri resourceUri = gadgetUri.resolve(Uri.fromJavaUri(ref.getUri()));
 HttpRequest request =
   new HttpRequest(resourceUri).setContainer(container).setGadget(gadgetUri).setInternalRequest( true );
 try {
  HttpResponse response = requestPipeline.execute(request);
  byte[] responseBytes = IOUtils.toByteArray(response.getResponse());
  return FetchedData.fromBytes(responseBytes, mimeType, response.getEncoding(),
    new InputSource(ref.getUri()));
 } catch (GadgetException e) {
  if (LOG.isLoggable(Level.INFO)) {
   LOG.logp(Level.INFO, CLASS_NAME, "makeFetcher", MessageKeys.FAILED_TO_RETRIEVE,
     new Object[] {ref.toString()});
  }
  throw new UriFetchException(ref, mimeType, e);
 } catch (IOException e) {
  if (LOG.isLoggable(Level.INFO)) {
   LOG.logp(Level.INFO, CLASS_NAME, "makeFetcher", MessageKeys.FAILED_TO_READ,
     new Object[] {ref.toString()});
  }
  throw new UriFetchException(ref, mimeType, e);
 }
}
origin: org.apache.shindig/shindig-gadgets

 public FetchedData fetch(ExternalReference ref, String mimeType) throws UriFetchException {
  Uri resourceUri = Uri.fromJavaUri(ref.getUri());
  if (contextUri != null) {
   resourceUri = contextUri.resolve(resourceUri);
  }
  HttpRequest request = new HttpRequest(resourceUri)
      .setContainer(req.getContainer())
      .setGadget(req.getGadget())
      .setInternalRequest( true );
  try {
   HttpResponse response = requestPipeline.execute(request);
   byte[] responseBytes = IOUtils.toByteArray(response.getResponse());
   return FetchedData.fromBytes(responseBytes, mimeType, response.getEncoding(),
     new InputSource(ref.getUri()));
  } catch (GadgetException e) {
   if (LOG.isLoggable(Level.INFO)) {
    LOG.logp(Level.INFO, classname, "proxyFetcher", MessageKeys.FAILED_TO_RETRIEVE, new Object[] {ref.toString()});
   }
   return null;
  } catch (IOException e) {
   if (LOG.isLoggable(Level.INFO)) {
    LOG.logp(Level.INFO, classname, "proxyFetcher", MessageKeys.FAILED_TO_READ, new Object[] {ref.toString()});
   }
   return null;
  }
 }
};
origin: org.wso2.org.apache.shindig/shindig-gadgets

.setAuthType(AuthType.OAUTH)
.setFollowRedirects(false)
.setInternalRequest(true);
origin: org.apache.shindig/shindig-gadgets

.setAuthType(AuthType.OAUTH)
.setFollowRedirects(false)
.setInternalRequest(true);
org.apache.shindig.gadgets.httpHttpRequestsetInternalRequest

Javadoc

An internal request is one created by the server to satisfy global server requirements. Examples are retrieving the RPC methods, loading features, or rewriting requests pulling in external content (that are driven back through the proxy to be completed). SecurityTokens would typically refer to a gadget as the source of the request, whereas the server initiated requests are occurring on behalf of the server, and not on behalf of a specific gadget.

Popular methods of HttpRequest

  • <init>
    Clone an existing HttpRequest.
  • addHeader
    Add a single header to the request. If a value for the given name is already set, a second value is
  • getAuthType
  • getCacheTtl
  • getContainer
  • getFollowRedirects
  • getGadget
  • getHeader
  • getHeaders
  • getIgnoreCache
  • getMethod
  • getOAuthArguments
  • getMethod,
  • getOAuthArguments,
  • getParam,
  • getParamAsInteger,
  • getPostBody,
  • getPostBodyAsString,
  • getPostBodyLength,
  • getRewriteMimeType,
  • getSecurityToken,
  • getUri

Popular in Java

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Option (scala)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now