Conditionally construct multipart form request depending on HTTP method