Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

add /scanBody as a REST handler that simply scans the body w/o using multipart/form-data #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

filex
Copy link

@filex filex commented Jan 6, 2022

For a REST API client the need to POST the file as multipart/form-data feels a bit cumbersome. There is only one file to be scanned at a time, its name does not matter either.

This P/R adds another endpoint /scanBody that simply scans the posted body. This makes it easier to use:

$ curl -i -d @eicar.com.txt http://localhost:9000/scanBody
HTTP/1.1 406 Not Acceptable
Content-Type: application/json; charset=utf-8
Date: Thu, 06 Jan 2022 17:04:55 GMT
Content-Length: 56

{ Status: "FOUND", Description: "Win.Test.EICAR_HDB-1" }

add /scanBody as a REST handler that simply scans the body (no multipart/form-data required here)

Co-authored-by: Marcel Ludwig <marcel.ludwig@avenga.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant