Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ForwardingRequestBody (0.27 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import java.io.IOException
    import okio.BufferedSink
    
    open class ForwardingRequestBody(delegate: RequestBody?) : RequestBody() {
      private val delegate: RequestBody
    
      fun delegate(): RequestBody {
        return delegate
      }
    
      override fun contentType(): MediaType? {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt

      }
    
      /** Returns a request that transforms `request` to be all uppercase.  */
      private fun uppercaseRequest(request: Request): Request {
        val uppercaseBody: RequestBody =
          object : ForwardingRequestBody(request.body) {
            @Throws(IOException::class)
            override fun writeTo(sink: BufferedSink) {
              delegate().writeTo(uppercaseSink(sink).buffer())
            }
          }
        return request.newBuilder()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        )
        val sinkReference = AtomicReference<BufferedSink>()
        val response =
          getResponse(
            Request(
              url = server.url("/"),
              body =
                object : ForwardingRequestBody(transferKind.newRequestBody("def")) {
                  override fun writeTo(sink: BufferedSink) {
                    sinkReference.set(sink)
                    super.writeTo(sink)
                  }
                },
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
Back to top