Examples of addHeader()


Examples of net.solosky.maplefetion.sipc.SipcResponse.addHeader()

    //把最后一个回复对象的所有消息头除了Content-Length都复制到新回复对象
    Iterator<SipcHeader> it = last.getHeaders().iterator();
    while(it.hasNext()){
      SipcHeader header = it.next();
      if(!SipcHeader.LENGTH.equals(header.getName())){  //如果不是L域就复制到新的回复头部中
        some.addHeader(header);
      }
    }
   
    //复制所有消息体到新的回复包中
    StringBuffer buffer = new StringBuffer();
View Full Code Here

Examples of net.sourceforge.stripes.mock.MockHttpServletRequest.addHeader()

    @Test
    public void testIsAjaxRequest() {
        MockHttpServletRequest request =
            new MockHttpServletRequest("", "/foo.action");
        assertFalse(AjaxUtils.isAjaxRequest(request));
        request.addHeader("X-Requested-With", "XMLHttpRequest");
        assertTrue(AjaxUtils.isAjaxRequest(request));

        request =
            new MockHttpServletRequest("", "/foo.action");
        request.getParameterMap().put("hello", new String[] {""});
View Full Code Here

Examples of ninja.Result.addHeader()

    @Test
    public void testCacheControlDoesNotGetTouchedWhenSet() {

        Result result = Results.json();
        // just a simple cache control header:
        result.addHeader(Result.CACHE_CONTROL, "must-revalidate");
        // just a new object as dummy...
        result.render(new Object());

        // handle result
        resultHandler.handleResult(result, context);
View Full Code Here

Examples of ninja.postoffice.Mail.addHeader()

        mail.addReplyTo("replyTo1@domain");
        mail.addReplyTo("replyTo2@domain");

        mail.setCharset("utf-8");
        mail.addHeader("header1", "value1");
        mail.addHeader("header2", "value2");

        mail.addTo("to1@domain");
        mail.addTo("to2@domain");
View Full Code Here

Examples of nz.co.wetstone.http.SimpleHTTPClient.addHeader()

            }
            SimpleHTTPClient.URIParameterBuilder builder = new SimpleHTTPClient.URIParameterBuilder();
            builder.setHost(url);
            builder.setStringEntity(json);
            SimpleHTTPClient client = new SimpleHTTPClient();
            client.addHeader("Content-Type", "application/json");
            String response = client.grabPageHTML(SimpleHTTPClient.HTTP_POST, builder);
            if(debug) {
                System.out.println("DEBUG::JSON Response: " + response);
            }
            return createResult(response);
View Full Code Here

Examples of org.apache.abdera.protocol.client.RequestOptions.addHeader()

        AbderaClient abderaClient = new AbderaClient(abdera);
        RequestOptions requestOptions = getAuthorization();
        requestOptions.addDateHeader("ToDate", to);
        requestOptions.addDateHeader("FromDate", from);
        requestOptions.addHeader("Action", "" + action);
        requestOptions.addHeader("Author", userName);
        ClientResponse resp = abderaClient.get(baseURI + APPConstants.ATOM +
                encodeURL(resourcePath +
                        RegistryConstants.URL_SEPARATOR +
                        APPConstants.PARAMETER_LOGS),
View Full Code Here

Examples of org.apache.abdera.protocol.server.provider.AbstractResponseContext.addHeader()

              return provider.deleteMedia(request);
            }
          }
          else if (method == "OPTIONS") {
            AbstractResponseContext rc = new EmptyResponseContext(200);
            rc.addHeader("Allow", combine(getAllowedMethods(type)));
            return rc;
          }
        } else {
          return handler.process(provider, request);
        }
View Full Code Here

Examples of org.apache.abdera.protocol.server.provider.EmptyResponseContext.addHeader()

              return provider.deleteMedia(request);
            }
          }
          else if (method == "OPTIONS") {
            AbstractResponseContext rc = new EmptyResponseContext(200);
            rc.addHeader("Allow", combine(getAllowedMethods(type)));
            return rc;
          }
        } else {
          return handler.process(provider, request);
        }
View Full Code Here

Examples of org.apache.airavata.services.registry.rest.security.MyHttpServletRequest.addHeader()

    }

    public void testAuthenticateSuccess() throws Exception {

        MyHttpServletRequest servletRequestRequest = new MyHttpServletRequest();
        servletRequestRequest.addHeader("sessionTicket", "1234");

        Assert.assertTrue(authenticator.authenticate(servletRequestRequest));

    }
View Full Code Here

Examples of org.apache.axis.AxisFault.addHeader()

            try {
                Vector headers = element.getEnvelope().getHeaders();
                for (int i = 0; i < headers.size(); i++) {
                    SOAPHeaderElement header =
                            (SOAPHeaderElement) headers.elementAt(i);
                    f.addHeader(header);                   
                }
            } catch (AxisFault axisFault) {
                // What to do here?
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.