From 7a4770b4bc645599604c73f721e7bba048fa5f71 Mon Sep 17 00:00:00 2001 From: zleyyij Date: Mon, 29 Jan 2024 14:36:45 -0700 Subject: [PATCH] docs: update docs for prior change --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 58d31cf..82bc73f 100644 --- a/README.md +++ b/README.md @@ -30,18 +30,12 @@ cargo test By default, the application listens on port `3000`, although that can be configured by setting the `HWAPI_PORT` environment variable or by passing `-p`/`--port`. ## Endpoints -To interact with the cpu api, submit a `GET` request to `/api/cpus` with a `Content-Type` of `application/json`. +To interact with the cpu api, submit a `GET` request to `/api/cpus/?name=[CPU_NAME]`, where `[CPU_NAME]` is the HTTP encoded name of the cpu. -The json submitted should look like this: -```json -{ - "name": "CPU_TO_LOOK_UP" -} -``` This endpoint does not guarantee the correctness of the model returned, it will always attempt to return a model. Here's an example curl request: ``` -curl -X GET -H "Content-Type: application/json" -d '{"name": "Intel Core i9-9900k"}' +curl "http://localhost:3000/api/cpus/?name=Intel%20Core%20i9-9900k" ```