Skip to content
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

Merged
merged 5 commits into from
Apr 27, 2018
Merged

WIP: Add http trigger support #34

merged 5 commits into from
Apr 27, 2018

Conversation

tanhe123
Copy link
Collaborator

No description provided.

@tanhe123 tanhe123 requested review from rockuw and shuaichang April 14, 2018 16:58
@CLAassistant
Copy link

CLAassistant commented Apr 14, 2018

CLA assistant check
All committers have signed the CLA.

@tanhe123 tanhe123 force-pushed the add_http_trigger_support branch 2 times, most recently from 703c06c to c2c1d23 Compare April 16, 2018 09:24
@tanhe123 tanhe123 force-pushed the add_http_trigger_support branch from 69fcf6e to e64ea48 Compare April 24, 2018 12:32
@tanhe123 tanhe123 requested a review from JacksonTian April 24, 2018 12:35
@tanhe123 tanhe123 force-pushed the add_http_trigger_support branch from e64ea48 to 1a561aa Compare April 24, 2018 12:39
@tanhe123 tanhe123 requested a review from wanghq April 25, 2018 02:03
@@ -42,6 +42,8 @@
import com.aliyuncs.fc.model.PrepareUrl;
import com.aliyuncs.fc.utils.ParameterHelper;

import static com.google.common.base.Strings.isNullOrEmpty;
Copy link
Collaborator

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) {
Copy link
Collaborator

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?

Copy link
Collaborator Author

@tanhe123 tanhe123 Apr 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,这是一个 breaking change,但是我觉得有必要修改:

  1. 引入 http trigger 前,用户没有任何需求会调用 header 相关的方法,所以这个改动没有影响。
  2. 原有的方法名 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 的语义。

@tanhe123 tanhe123 merged commit fcf50a4 into master Apr 27, 2018
rsonghuster pushed a commit that referenced this pull request Jun 19, 2020
add http trigger support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants