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

ios: Unary HTTP request interfaces #118

Closed
rebello95 opened this issue Jun 17, 2019 · 4 comments · Fixed by #273
Closed

ios: Unary HTTP request interfaces #118

rebello95 opened this issue Jun 17, 2019 · 4 comments · Fixed by #273
Assignees
Labels
no stalebot platform/ios Issues related to iOS
Milestone

Comments

@rebello95
Copy link
Contributor

rebello95 commented Jun 17, 2019

  • Utilize the common request interfaces and wrap them in native Swift/Kotlin code for end consumers to use for performing unary HTTP requests
  • This is the bulk of the work required for performing HTTP requests directly through Envoy Mobile

Detailed documentation on what these interfaces should look like is available in this doc.
Android issue: #119

@rebello95 rebello95 added the platform/ios Issues related to iOS label Jun 17, 2019
@rebello95 rebello95 added this to the v0.2 "Primo" milestone Jun 17, 2019
@rebello95 rebello95 self-assigned this Jun 17, 2019
rebello95 added a commit that referenced this issue Jul 16, 2019
Adds Swift interfaces for responses within Envoy. These should be at parity with the interfaces being added for Kotlin in #260.

Resolves #118.

Doc for reference: https://docs.google.com/document/d/1N0ZFJktK8m01uqqgfDRVB9mpC1iEn9dqkQaa_yMn_kE/edit#heading=h.i6ky65xaa9va

Signed-off-by: Michael Rebello <[email protected]>
@stale
Copy link

stale bot commented Jul 18, 2019

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 18, 2019
@rebello95
Copy link
Contributor Author

Request interfaces: #242

rebello95 added a commit that referenced this issue Jul 19, 2019
Adds Swift interfaces for responses within Envoy. These should be at parity with the interfaces being added for Kotlin in #265.

Replaces #261.

Resolves #118.

Signed-off-by: Michael Rebello <[email protected]>
@rebello95
Copy link
Contributor Author

Response interfaces: #273 (replaces #261)

rebello95 added a commit that referenced this issue Jul 22, 2019
Adds Swift interfaces for responses within Envoy. These should be at parity with the interfaces being added for Kotlin in #265.

Replaces #261.

Resolves #118.
Also resolves #247.

Signed-off-by: Michael Rebello <[email protected]>
rebello95 added a commit that referenced this issue Aug 20, 2019
Adds unary interfaces (related to #118) which will call into the streaming interfaces under the hood.

These are to be used as convenience convenience accessors for the common case of non-streaming requests, and will be added on Android as part of #119.

This also removes `data` and `trailers` from `Request`, as the unary function will take care of this for unary requests, and streams will be expected to handle this through the `StreamEmitter`.

The underlying implementation will look something like this:

```swift
public func sendUnary(_ request: Request, body: Data?,
                      trailers: [String: [String]] = [:], handler: ResponseHandler)
{
  let emitter = self.startStream(with: request, handler: handler)
  if let body = body {
    emitter.sendData(body)
  }

  emitter.close(trailers: trailers)
}
```

Signed-off-by: Michael Rebello <[email protected]>
@rebello95
Copy link
Contributor Author

Unary requests that use streaming under the hood: #347

jpsim pushed a commit to envoyproxy/envoy that referenced this issue Nov 28, 2022
Adds Swift interfaces for responses within Envoy. These should be at parity with the interfaces being added for Kotlin in envoyproxy/envoy-mobile#265.

Replaces envoyproxy/envoy-mobile#261.

Resolves envoyproxy/envoy-mobile#118.
Also resolves envoyproxy/envoy-mobile#247.

Signed-off-by: Michael Rebello <[email protected]>
Signed-off-by: JP Simard <[email protected]>
jpsim pushed a commit to envoyproxy/envoy that referenced this issue Nov 28, 2022
Adds unary interfaces (related to envoyproxy/envoy-mobile#118) which will call into the streaming interfaces under the hood.

These are to be used as convenience convenience accessors for the common case of non-streaming requests, and will be added on Android as part of envoyproxy/envoy-mobile#119.

This also removes `data` and `trailers` from `Request`, as the unary function will take care of this for unary requests, and streams will be expected to handle this through the `StreamEmitter`.

The underlying implementation will look something like this:

```swift
public func sendUnary(_ request: Request, body: Data?,
                      trailers: [String: [String]] = [:], handler: ResponseHandler)
{
  let emitter = self.startStream(with: request, handler: handler)
  if let body = body {
    emitter.sendData(body)
  }

  emitter.close(trailers: trailers)
}
```

Signed-off-by: Michael Rebello <[email protected]>
Signed-off-by: JP Simard <[email protected]>
jpsim pushed a commit to envoyproxy/envoy that referenced this issue Nov 29, 2022
Adds Swift interfaces for responses within Envoy. These should be at parity with the interfaces being added for Kotlin in envoyproxy/envoy-mobile#265.

Replaces envoyproxy/envoy-mobile#261.

Resolves envoyproxy/envoy-mobile#118.
Also resolves envoyproxy/envoy-mobile#247.

Signed-off-by: Michael Rebello <[email protected]>
Signed-off-by: JP Simard <[email protected]>
jpsim pushed a commit to envoyproxy/envoy that referenced this issue Nov 29, 2022
Adds unary interfaces (related to envoyproxy/envoy-mobile#118) which will call into the streaming interfaces under the hood.

These are to be used as convenience convenience accessors for the common case of non-streaming requests, and will be added on Android as part of envoyproxy/envoy-mobile#119.

This also removes `data` and `trailers` from `Request`, as the unary function will take care of this for unary requests, and streams will be expected to handle this through the `StreamEmitter`.

The underlying implementation will look something like this:

```swift
public func sendUnary(_ request: Request, body: Data?,
                      trailers: [String: [String]] = [:], handler: ResponseHandler)
{
  let emitter = self.startStream(with: request, handler: handler)
  if let body = body {
    emitter.sendData(body)
  }

  emitter.close(trailers: trailers)
}
```

Signed-off-by: Michael Rebello <[email protected]>
Signed-off-by: JP Simard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no stalebot platform/ios Issues related to iOS
Projects
None yet
1 participant