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

Requests from transport API #1293

Merged
merged 2 commits into from
Sep 17, 2020
Merged

Requests from transport API #1293

merged 2 commits into from
Sep 17, 2020

Conversation

tomchristie
Copy link
Member

@tomchristie tomchristie commented Sep 17, 2020

Related to #1091

Improving our support for instantiating a request instance, from the transport API.

  • method may now be either str or bytes.
  • url now supports passing a raw URL. (bytes, bytes, Optional[int], bytes).

Working towards being able to do something like...

class CustomTransport:
    def request(self, method, url, headers, stream, timeout):
        request = httpx.Request(method, url, headers, stream)
        ...
        response = httpx.Response(...)
        return response.raw

@tomchristie tomchristie added the refactor Issues and PRs related to code refactoring label Sep 17, 2020
@tomchristie tomchristie changed the title Requests from transport api Requests from transport API Sep 17, 2020
@tomchristie tomchristie merged commit e1f7791 into master Sep 17, 2020
@tomchristie tomchristie deleted the requests-from-transport-api branch September 17, 2020 10:59
This was referenced Sep 21, 2020
@johtso
Copy link
Contributor

johtso commented Sep 22, 2020

Is the raw property on the request still waiting to be done? Would be useful for the transport tests that I'm fiddling with. Maybe request should expose a similar property that matches the input to the transport .request()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues and PRs related to code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants