Skip to content

Use http status number with text code instead of just the status number as a string #83

@amasare

Description

@amasare

Status: strconv.Itoa(status),

According to https://golang.org/src/net/http/response.go?s=731:4298#L25 the http Response object should return the http status number as well as the status text. So

&http.Response{
		Status:        strconv.Itoa(status),
		StatusCode:    status,
		Body:          NewRespBodyFromString(body),
		Header:        http.Header{},
		ContentLength: -1,
	}

should be

		Status:        strconv.Itoa(status) + " " + http.StatusText(status),
		StatusCode:    status,
		Body:          NewRespBodyFromString(body),
		Header:        http.Header{},
		ContentLength: -1,
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions