Skip to content

Requests from transport API - #1293

Merged
lovelydinosaur merged 2 commits into
masterfrom
requests-from-transport-api
Sep 17, 2020
Merged

Requests from transport API#1293
lovelydinosaur merged 2 commits into
masterfrom
requests-from-transport-api

Conversation

@lovelydinosaur

@lovelydinosaurlovelydinosaur commented Sep 17, 2020

Copy link
Copy Markdown
Contributor

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...

classCustomTransport:
defrequest(self, method, url, headers, stream, timeout):
request=httpx.Request(method, url, headers, stream)
...
response=httpx.Response(...)
returnresponse.raw

@lovelydinosaurlovelydinosaur added the refactor Issues and PRs related to code refactoring label Sep 17, 2020
@lovelydinosaurlovelydinosaur changed the title Requests from transport apiRequests from transport APISep 17, 2020
@lovelydinosaur
lovelydinosaur merged commit e1f7791 into masterSep 17, 2020
@lovelydinosaur
lovelydinosaur deleted the requests-from-transport-api branch September 17, 2020 10:59
@lovelydinosaurlovelydinosaur mentioned this pull request Sep 21, 2020
4 tasks
@johtso

johtso commented Sep 22, 2020

Copy link
Copy Markdown
Contributor

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactorIssues and PRs related to code refactoring

Development

Successfully merging this pull request may close these issues.

2 participants

@lovelydinosaur@johtso