MCPcopy
hub / github.com/photonixapp/photonix / post

Method post

tests/conftest.py:63–72  ·  view source on GitHub ↗

Send a POST request. This wrapper sets the `application/json` content type which is more suitable for standard GraphQL requests and doesn't mismatch with handling multipart requests in Graphene.

(self, data=None, **kwargs)

Source from the content-addressed store, hash-verified

61 self.token = get_token(user)
62
63 def post(self, data=None, **kwargs):
64 """Send a POST request.
65 This wrapper sets the `application/json` content type which is
66 more suitable for standard GraphQL requests and doesn't mismatch with
67 handling multipart requests in Graphene.
68 """
69 if data:
70 data = json.dumps(data, cls=DjangoJSONEncoder)
71 kwargs["content_type"] = "application/json"
72 return super().post(API_PATH, data, **kwargs)
73
74 def post_graphql(
75 self,

Callers 2

post_graphqlMethod · 0.80
post_multipartMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected