You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using Apollo Server v4, and we have copied custom logic from PR #66 to support our new changes. Today, we see support from this package; however, after updating it, all APIs fail due to content-type. Is it possible to set a content type header for all POST requests?
@barddoo - Yes, but because we have a large number of clients who use our APIs, it is difficult to contact everyone and request that they add the Content Type header. Is it possible to set the default contentType in the library if the request does not have one?
Hello,
We are using Apollo Server v4, and we have copied custom logic from PR #66 to support our new changes. Today, we see support from this package; however, after updating it, all APIs fail due to content-type. Is it possible to set a content type header for all POST requests?
Example
server.startInBackgroundHandlingStartupErrorsByLoggingAndFailingAllRequests();
return async (req: HttpRequest, context: InvocationContext) => {
if(req.method === 'POST') {
req.headers.set('content-type', 'application/json')
}
The text was updated successfully, but these errors were encountered: