Allow viewing the raw request and response for debugging when using the SDK

Open
#998 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
node.js, typescript
Domain
api

Research direction

The issue names no files or tests. Start by tracing the Graph client and call middleware request pipeline; determine how a debug mode or middleware callback could expose request and response URLs, payloads, and headers. Done means callers can inspect this information in Node applications without using a proxy.

Written by the indexing model from the issue text.

Description

request: feature

Feature Request

Is your feature request related to a problem? Please describe

When using the SDK, sometimes I want to debug the call. Often this happens when a call fails and I want to verify what's going over the wire and what's coming back to determine if it's the Graph API or the SDK that's failing.

Describe the solution you'd like

I'd like to be able to put the Graph client, or a call in debug mode, where I get to see the request and response (URL + payload + headers) that go over the wire.

Describe alternatives you've considered

In a browser I can get this information from the network tab, but in Node apps, this would require a proxy which is inconvenient.

Additional context

Perhaps we could use implementing this feature using middleware, where we offer additional middleware that's logging requests and responses to console or better yet, offers a callback that allows me to decide how I want to deal with the information.

Dominant language
TypeScript
Stars
833
Forks
240
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoftgraph/msgraph-sdk-javascript

All issues in microsoftgraph/msgraph-sdk-javascript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.