Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

how to pass a file and body at same time? #410

Description

@Alnyz

i've new in hyper i want just send request using file for a body but i didn't get valid argument for this

let say i have code like this:

from hyper import HTTPConnection

file = open(myfile, "rb")
body = {
    "content":b"mycontent"
}
req = HTTPConnection("myhost.com")
req.request("GET","/path", body=body)
response = req.get_response()
print(response)

i dont know how to pass my file into request argument, so many appreciate for any help

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions