juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JUNEAU-55) remote proxy should support more HTTP methods
Date Thu, 15 Jun 2017 15:51:00 GMT

    [ https://issues.apache.org/jira/browse/JUNEAU-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050651#comment-16050651
] 

ASF GitHub Bot commented on JUNEAU-55:
--------------------------------------

Github user johnament commented on a diff in the pull request:

    https://github.com/apache/incubator-juneau/pull/3#discussion_r122239466
  
    --- Diff: juneau-core/src/main/java/org/apache/juneau/remoteable/RemoteableMethodMeta.java
---
    @@ -74,8 +74,8 @@ private Builder(String restUrl, Method m) {
     			RemoteMethod rm = m.getAnnotation(RemoteMethod.class);
     
     			httpMethod = rm == null ? "POST" : rm.httpMethod();
    -			if (! isOneOf(httpMethod, "GET", "POST"))
    -				throw new RemoteableMetadataException(m, "Invalid value specified for @RemoteMethod.httpMethod()
annotation.  Valid values are [GET,POST].");
    +			if (! isOneOf(httpMethod, "DELETE", "GET", "POST", "PUT"))
    +				throw new RemoteableMetadataException(m, "Invalid value specified for @RemoteMethod.httpMethod()
annotation.  Valid values are [DELTE,GET,POST,PUT].");
    --- End diff --
    
    again, an enum would just mean we have to do `HttpMethods.values()`


> remote proxy should support more HTTP methods
> ---------------------------------------------
>
>                 Key: JUNEAU-55
>                 URL: https://issues.apache.org/jira/browse/JUNEAU-55
>             Project: Juneau
>          Issue Type: Improvement
>            Reporter: Steve Blackmon
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Currently if you try to use remote proxy on a interface to perform 'DELETE' or 'PUT',
you get an exception like:
> java.lang.RuntimeException: org.apache.juneau.remoteable.RemoteableMetadataException:
Invalid remoteable definition found on class org.apache.streams.twitter.api.AccountActivity
on method deleteWebhook. Invalid value specified for @RemoteMethod.httpMethod() annotation.
 Valid values are [GET,POST].
> 	at org.apache.juneau.rest.client.RestClient.getRemoteableProxy(RestClient.java:631)
> DELETE and PUT are pretty widely used.  It would great to be able to use those and really
any other http methods via interface proxies



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message