-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add http trigger support #34
Conversation
703c06c
to
c2c1d23
Compare
69fcf6e
to
e64ea48
Compare
e64ea48
to
1a561aa
Compare
@@ -42,6 +42,8 @@ | |||
import com.aliyuncs.fc.model.PrepareUrl; | |||
import com.aliyuncs.fc.utils.ParameterHelper; | |||
|
|||
import static com.google.common.base.Strings.isNullOrEmpty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's group the imports
@@ -37,13 +37,17 @@ | |||
public HttpResponse() { | |||
} | |||
|
|||
public void putHeaderParameter(String key, String value) { | |||
public void setHeader(String key, String value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,这是一个 breaking change,但是我觉得有必要修改:
- 引入 http trigger 前,用户没有任何需求会调用 header 相关的方法,所以这个改动没有影响。
- 原有的方法名 putHeaderParameter、getHeaderValue,我觉得表意不明,我改成了 getHeader、setHeader,我觉得有必要。
必要的原因是,另外一个 breaking change:
我们有两组重复的方法
setHeader(Map<String, String> header)
Map<String, String> getHeader()
setHeaders(Map<String, String> header)
Map<String, String> getHeaders()
每组的状态是不一致的,意思是通过 setHeader 设置的值,getHeader 可以取到,getHeaders 取不到,我觉得也有必要修改,所以我删掉了原有的 getHeader、setHeader。将其修改为 getHeaderValue、putHeaderParameter 的语义。
No description provided.