/** * Returns the value for the <code>Content-Disposition</code> header. * * @return The value for the <code>Content-Disposition</code> header. */ @Header("Content-Disposition") public String getContentDisposition() { return "attachment;filename=" + fileName; }
/** * Returns the value for the <code>Content-Disposition</code> header. * * @return The value for the <code>Content-Disposition</code> header. */ @Header("Content-Disposition") public String getContentDisposition() { return "attachment;filename=" + fileName; }
@Header("Content-Type") @Override /* Streamable */ public MediaType getMediaType() { return MediaType.forString("application/zip"); }
@Header("Content-Type") @Override /* Streamable */ public MediaType getMediaType() { return MediaType.forString("application/zip"); }
@Header( name="H", description={"a","b"}, type="string" ) public static class SA01 { public SA01(String x) {} } @RestMethod
@Header("Content-Type") @Override /* Streamable */ public MediaType getMediaType() { return MediaType.forString("application/zip"); }
@Header(name="H") public static class SB02 { public String f1; } @RestMethod
@Header(name="H") public static class SB03 extends LinkedList<String> { private static final long serialVersionUID = 1L; } @RestMethod
@Header( name="H", api={ "description:'a\nb',", "type:'string'" } ) public static class SA02 { public SA02(String x) {} } @RestMethod
@RestMethod(name=GET, path="/headerIfNE1") public String headerIfNE1( @Header("a") String a ) throws Exception { assertEquals("foo", a); return "OK"; }
@RestMethod public void ta01( @Header( name="H", description={"a","b"}, type="string" ) String h) {}
@RestMethod public void ta02( @Header( name="H", api={ "description:'a\nb',", "type:'string'", } ) String h) {}
@RestMethod(name=PUT, path="/setParameterToInvalidTypes/{a1}") public String b07(@Query("p1") int t1, @Path("a1") int a1, @Header("h1") int h1) { return "OK"; } }
@RestMethod(name=GET, path="/{d1}") public String testClassTransforms(@Path(name="d1") Date d1, @Query(name="d2") Date d2, @Header(name="X-D3") Date d3) throws Exception { DateSwap df = DateSwap.ISO8601DTZ.class.newInstance(); BeanSession session = BeanContext.DEFAULT.createSession(); return "d1="+df.swap(session, d1)+",d2="+df.swap(session, d2)+",d3="+df.swap(session, d3)+""; } }
@Body @Response @ResponseHeader @X public static class A01 { @Query @Header @FormData @Path @Schema public int f1; }