Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
6 subscribers
Views
2625 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Could somebody confirm that the smart service HTTP File Upload uses by default a
orlandom
over 9 years ago
Could somebody confirm that the smart service HTTP File Upload uses by default as the content type of POST requests "multipart/form-data"?
If that is so, how could I change the content-type to "application/x-www-form-urlencoded"? Passing it as a part of a header parameter seems to be ignored.
In fact, all I want to do is the equivalent of the following Java code (that is, the only thing written into the body of the request are the bytes of the file):
File fileToUpload = new File("test.doc");
String url = "localhost:8080/les-services/HttpContentHandler.ashx?token=" +
authenticationToken + "&contextID=" + contextID + "&fileName=test.doc" +
"&fileSize=" + fileToUpload.length();
URL obj = new URL(url);
con = (HttpURLConnection) obj.openConnection();
con.setDoOutput(true);
con.setRequestProperty("User-Agent", "Mozilla/5.0");
con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");
PrintWriter wr = new...
OriginalPostID-151025
OriginalPostID-151025
Discussion posts and replies are publicly visible
Parents
0
Stefan Helzle
A Score Level 3
over 9 years ago
Check
www.huyng.com/.../
for how a correct request has to look. Appian does it the right way. Any chance you can modify the server side. If not you need to write an Appian plugin.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Stefan Helzle
A Score Level 3
over 9 years ago
Check
www.huyng.com/.../
for how a correct request has to look. Appian does it the right way. Any chance you can modify the server side. If not you need to write an Appian plugin.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data