I have the following HttpeRequest Body as Text:
--batch_f1d4b121-35c3-40a0-bbbd-cb1a9f1a5f13
Content-Type: application/http; msgtype=request
POST /api/values HTTP/1.1
Host: localhost:5102
Content-Type: application/json; charset=utf-8
{"value": "Hello World"}
--batch_f1d4b121-35c3-40a0-bbbd-cb1a9f1a5f13
Content-Type: application/http; msgtype=request
PUT /api/values/5 HTTP/1.1
Host: localhost:5102
Content-Type: application/json; charset=utf-8
{"value": "Hello World"}
--batch_f1d4b121-35c3-40a0-bbbd-cb1a9f1a5f13
Content-Type: application/http; msgtype=request
DELETE /api/values/5 HTTP/1.1
Host: localhost:5102
--batch_f1d4b121-35c3-40a0-bbbd-cb1a9f1a5f13--
I tired using regex and I succeed in some and fail in others.
Dose any one manage to parse and split ?
I found that I could use MultipartSection to navigate through the batch requests:
I have got a solution from ChatGPT:
I need better if any one faced something like it.