This adds constants for three common Content-Disposition types: attachment
, form-data
, and inline
.
I have also updated the tests to use these new constants.
Comment From: kashike
Is there anything holding this pull request back? It is very simple and non-breaking.
Comment From: rstoyanchev
I think adding alternatives to the static builder(String)
such as formData()
, inline()
, and attachment()
would make the case of building more convenient than using constants and that be good enough since I'm guessing that building is the more common case.
WDYT and if you agree would you like to update your PR with those changes?
Comment From: kashike
@rstoyanchev I have added the helper methods, but I have also kept the new constants as well, as they are still useful - for example, checking the type: disposition.getType().equals(ContentDisposition.ATTACHMENT)
.
Let me know if this is okay with you now.
Comment From: kashike
@rstoyanchev How does that look now?