Question
IBM
CN
Last activity: 28 Oct 2024 9:37 EDT
pyRequestAttachmentPage does not work multipart/form-data request
Hi, I tried to send out a file via REST API with content type multipart/form-data
I have followed below guidance.
After Connect rule is called, the log display below:
///
...
Request attachment page detected. Attemtping to construct multipart message.
Multipart request message has been constructed.
...
///
this prove the Connect rule has detected pyRequestAttachmentPage, and then the HTTP request content is displayed in log (but no any detail data there):
------------------HTTP REQUEST CONTENTS------------------POST /snow/api/now/attachment/upload HTTP/1.1 Request Headers: {Content-Type=multipart/form-data; boundary=kOAl24jNArECZE6o3Af0bO8I5JEsdljQXt-RZ} Request Message Data: 661 bytes to be sent
----------------END HTTP REQUEST CONTENTS----------------
however later
HTTP Status code: 400 Bad Request
------------------HTTP RESPONSE CONTENTS------------------
...
...
Response Message Data: 86 bytes received {"error":{"message":"Missing parameter: table_name","detail":null},"status":"failure"}
----------------END HTTP RESPONSE CONTENTS----------------
server says Missing parameter: table_name
Hi, I tried to send out a file via REST API with content type multipart/form-data
I have followed below guidance.
After Connect rule is called, the log display below:
///
...
Request attachment page detected. Attemtping to construct multipart message.
Multipart request message has been constructed.
...
///
this prove the Connect rule has detected pyRequestAttachmentPage, and then the HTTP request content is displayed in log (but no any detail data there):
------------------HTTP REQUEST CONTENTS------------------POST /snow/api/now/attachment/upload HTTP/1.1 Request Headers: {Content-Type=multipart/form-data; boundary=kOAl24jNArECZE6o3Af0bO8I5JEsdljQXt-RZ} Request Message Data: 661 bytes to be sent
----------------END HTTP REQUEST CONTENTS----------------
however later
HTTP Status code: 400 Bad Request
------------------HTTP RESPONSE CONTENTS------------------
...
...
Response Message Data: 86 bytes received {"error":{"message":"Missing parameter: table_name","detail":null},"status":"failure"}
----------------END HTTP RESPONSE CONTENTS----------------
server says Missing parameter: table_name
I have coded this param in activity for calling the Connect rule:
do you have idea what's the possible reason?
I guess the value list are not used at all so the request content in Log does not have any params in it.
Thanks.