if CreateWorkflow param nil, create wf with self session

This commit is contained in:
huangsimin 2018-11-27 14:05:24 +08:00
parent 7b326f3644
commit f2fe449880

View File

@ -68,6 +68,10 @@ func (curl *CURL) CreateSession() *requests.Session {
func (curl *CURL) CreateWorkflow(ses *requests.Session) *requests.Workflow {
var wf *requests.Workflow
if ses == nil {
ses = curl.CreateSession()
}
switch curl.Method {
case "HEAD":
wf = ses.Head(curl.ParsedURL.String())