Skip to content

Commit

Permalink
adding binary media type and readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Schwitter committed Aug 28, 2024
1 parent 69c5a3b commit 37d3e02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Binary file added image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ We are using the latest versions of .net, Lambda as well as IronPdf.
1. You should now be ready to run post requests against your API to generate a pdf document, e.g. against `https://a6sd5fa6ds.execute-api.ap-southeast-2.amazonaws.com/v1/document-generation`
1. See below load test which will fire concurrent requests against the Lambda to provoke the segmentation fault eventually.

## Getting a single document via postman

You can use postman to get the sample pdf which this repo generates once deployed.

Use your url from above, e.g. `https://a6sd5fa6ds.execute-api.ap-southeast-2.amazonaws.com/v1/document-generation`

![Postman request](image.png)

## Reproduction of the intermittent issue

Run the crude load tests by executing `npx tsx ./load-test/boom.ts` from the console root.
Expand Down
2 changes: 1 addition & 1 deletion src/infra/constructs/rest-api/rest-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class SegFaultRestApi extends Construct {
),
accessLogFormat: AccessLogFormat.jsonWithStandardFields(),
},

binaryMediaTypes: ['*/*'],
};

const restApi = new RestApi(this, 'SegFaultApi', apiConfiguration);
Expand Down

0 comments on commit 37d3e02

Please sign in to comment.