- Sort Score
- Result 10 results
- Languages All
Results 331 - 340 of 1,223 for headers (0.08 sec)
-
okhttp/src/test/java/okhttp3/MultipartBodyTest.kt
fun partAccessors() { val body = MultipartBody.Builder() .addPart(headersOf("Foo", "Bar"), "Baz".toRequestBody(null)) .build() assertThat(body.parts.size).isEqualTo(1) val part1Buffer = Buffer() val part1 = body.part(0) part1.body.writeTo(part1Buffer) assertThat(part1.headers).isEqualTo(headersOf("Foo", "Bar")) assertThat(part1Buffer.readUtf8()).isEqualTo("Baz") } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/testing.md
接着只需在测试中同样操作。 示例: * 传一个*路径* 或*查询* 参数,添加到URL上。 * 传一个JSON体,传一个Python对象(例如一个`dict`)到参数 `json`。 * 如果你需要发送 *Form Data* 而不是 JSON,使用 `data` 参数。 * 要发送 *headers*,传 `dict` 给 `headers` 参数。 * 对于 *cookies*,传 `dict` 给 `cookies` 参数。 关于如何传数据给后端的更多信息 (使用`httpx` 或 `TestClient`),请查阅 <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX 文档</a>. /// info | "信息"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
} } private fun headersToList(response: MockResponse): List<String> { val headers = response.headers val size = headers.size val headerList: MutableList<String> = ArrayList(size) for (i in 0 until size) { headerList.add(headers.name(i) + ": " + headers.value(i)) } return headerList } @Test fun shutdownWithoutStart() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
// treats an incomplete response body as a ProtocolException. } } private fun headersToList(response: MockResponse.Builder): List<String> { val headers = response.build().headers return headers.map { (key, value) -> "$key: $value" }.toList() } @Test fun shutdownWithoutStart() { val server = MockWebServer() server.shutdown() } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.5K bytes - Viewed (0) -
docs/em/docs/deployment/docker.md
COPY ./app /code/app CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"] # If running behind a proxy like Nginx or Traefik add --proxy-headers # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--proxy-headers"] ``` </details> ## ⚫️❔ 📦 📦 (✴️ 💾 📦) 📶 **💿** 🌌 📦 🈸 ✅ 🌐 👫 🔗 & 💪 📁 ⏪ 🚧 👫 ❎ ⚪️➡️ 🎏 📦 (🎏 🈸 ⚖️ 🦲) 🎏 ⚙️.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Aug 12 21:47:53 UTC 2024 - 27.9K bytes - Viewed (0) -
docs_src/security/tutorial003_py310.py
user = fake_decode_token(token) if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Invalid authentication credentials", headers={"WWW-Authenticate": "Bearer"}, ) return user async def get_current_active_user(current_user: User = Depends(get_current_user)): if current_user.disabled:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 2.4K bytes - Viewed (0) -
docs_src/security/tutorial003.py
user = fake_decode_token(token) if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Invalid authentication credentials", headers={"WWW-Authenticate": "Bearer"}, ) return user async def get_current_active_user(current_user: User = Depends(get_current_user)): if current_user.disabled:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 2.4K bytes - Viewed (0) -
cmd/api-response.go
w.Header().Get(xhttp.AmzRequestID), w.Header().Get(xhttp.AmzRequestHostID)) encodedErrorResponse := encodeResponse(errorResponse) writeResponse(w, err.HTTPStatusCode, encodedErrorResponse, mimeXML) } func writeErrorResponseHeadersOnly(w http.ResponseWriter, err APIError) { w.Header().Set(xMinIOErrCodeHeader, err.Code) w.Header().Set(xMinIOErrDescHeader, "\""+err.Description+"\"")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 19:27:06 UTC 2024 - 33.4K bytes - Viewed (0) -
cmd/http-tracer.go
Method: r.Method, RawQuery: redactLDAPPwd(r.URL.RawQuery), Client: handlers.GetSourceIP(r), Headers: reqHeaders, Path: reqPath, Body: reqRecorder.Data(), }, RespInfo: madmin.TraceResponseInfo{ Time: reqEndTime, Headers: respRecorder.Header().Clone(), StatusCode: respRecorder.StatusCode, Body: respRecorder.Body(), },
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 17:13:00 UTC 2024 - 6K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial004.py
def test_path_operation_img(): shutil.copy("./docs/en/docs/img/favicon.png", "./image.png") response = client.get("/items/foo?img=1") assert response.status_code == 200, response.text assert response.headers["Content-Type"] == "image/png" assert len(response.content) os.remove("./image.png") def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.8K bytes - Viewed (0)