Codota Logo
HttpRequest.setInternalRequest
Code IndexAdd Codota 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)

  • Common ways to obtain HttpRequest
private void myMethod () {
HttpRequest h =
  • Codota IconUri uri;new HttpRequest(uri)
  • Codota IconString text;new HttpRequest(Uri.parse(text))
  • Codota IconUri uri;AuthType authType;new HttpRequest(uri).setAuthType(authType)
  • Smart code suggestions by Codota
}
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

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • startActivity (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JList (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now