If we only use pyRequestAttachmentPage that is possible.
But in the current implementation JSON message is prepared using the connector rule. That is the issue we're facing where although we set a header in the connector rule its not getting override for the JSON part when request is prepared through pyInvokeRESTConnector activity.
This issue is a bug in Pega 7.2 code base[SR-C25702]. This is fixed in 8.1 as per the SR update.
So we have removed message data from connector rule and add that JSON part into pyRequestAttachment page as the solution. In there we can provide the content type also as a parameter. And multi-part request also built in the expected format.