If the resource method arguments and return type are the same, then yes.

On Mon, Sep 26, 2016 at 1:36 PM, Ervin Wu <[email protected]> wrote:

> Hey Evan,
>
> Thanks for your response! I have a quick clarification, does that mean I
> can reuse the POST code and just change the POST method to PUT method?
>
> On Mon, Sep 26, 2016 at 4:18 PM, Evan Meagher <[email protected]>
> wrote:
>
>> Hello Ervin,
>>
>> PUT endpoints can be implemented in the same way as POST endpoints,
>> except that you use the @PUT annotation. See Jersey documentation for
>> details: https://jersey.java.net/documentation/latest/jaxrs-
>> resources.html#d0e2083
>>
>> On Mon, Sep 26, 2016 at 1:12 PM, <[email protected]> wrote:
>>
>>> I am currently using your dropwizard-example (latest version) as a guide
>>> for my project. I was curious on how to send put requests, so that the
>>> resource gets updated in the database. I was trying to created an update
>>> method in the PersonDAO class but was having trouble finding documentation
>>> on how to do so. I have a @POST request in PERSONRESOURCE.java, which calls
>>> the update method for the database. I couldn't find a lot of documentation
>>> on creating PUT requests and updating the database. There are any tips that
>>> you may suggest?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "dropwizard-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Evan Meagher
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "dropwizard-user" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/dropwizard-user/T0AP1tH7svk/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Thanks,
> Ervin Wu
>
> --
> You received this message because you are subscribed to the Google Groups
> "dropwizard-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Evan Meagher

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to