go to post Emil Odobasic · Mar 7 Hello!Thank you for your response! :) I am not doing anything special with the request. I am just supposed to receive the request and send it away, and then receive the response and show it to the original sender.I did look into this matter with the help of WRC. We managed to make it work with what Enrico said, using an EnsLib.REST.GenericService and an EnsLib.REST.GenericOperation.
go to post Emil Odobasic · Mar 7 Hello!Thanks for the reply! I got it to work finally with the help of WRC! :)
go to post Emil Odobasic · Feb 15 Hello!The response from Robert worked for my purpose! But your solution sounded interesting aswell, I will try it out just for curiosity! :) Thanks for taking the time to respond! :)
go to post Emil Odobasic · Jan 29 Okay! So what finally solved it was a discussion with the WRC support. Within the Postman request, and the form-data; Content-type was specified as text/plain on each part of the form. That is why %request.Data("profile") wouldn't work at first. The content of each part of the form gets sent into the REST-service as a stream.With this said, instead I had to use this code which finally worked: set profileStream = %request.GetMimeData("profile")set vProfile = profileStream.Read()However, one thing worth noting is that when I did not specify content-type for each part of the form-data, then the original code I used worked: set vProfile = $Get(%request.Data("profile")) . Thanks to WRC and everyone here who tried to help! :)
go to post Emil Odobasic · Jan 29 Okay! So what finally solved it was a discussion with the WRC support. Within the Postman request, and the form-data; Content-type was specified as text/plain on each part of the form. That is why %request.Data("profile") wouldn't work at first. The content of each part of the form gets sent into the REST-service as a stream.With this said, instead I had to use this code which finally worked: set profileStream = %request.GetMimeData("profile")set vProfile = profileStream.Read()However, one thing worth noting is that when I did not specify content-type for each part of the form-data, then the original code I used worked: set vProfile = $Get(%request.Data("profile")) . Thanks to WRC and everyone here who tried to help! :)
go to post Emil Odobasic · Jan 12 Hello! :) Yes, I did manage to upload a file using similar code. What doesn't work is actually not being able to read strings that are sent via the form-data to my service. The Key that is being sent in the form-data, via postman, is "Profile" and the value of the key is "TEST". So far I can't manage to log the value "TEST". :(
go to post Emil Odobasic · Jan 12 Hello! :) The request that is being sent to my rest-service via postman has one key in the form which is "Profile". The Value of "Profile" is "TEST". But I cannot get my service to log "TEST". By attribute do you mean the Value of the key "Profile"? :)
go to post Emil Odobasic · Jan 10 Hello! It is not an encoded form. :( You might be right about WRC being able to help out!
go to post Emil Odobasic · Jan 10 Hello! It still does not seem to retrieve anything :(. Just an empty string
go to post Emil Odobasic · Jan 8 yes, I am 100% sure. Don't really know where it has gone wrong.Double checked postman just to be sure.
go to post Emil Odobasic · Jan 8 "Profile" is one of the keys in the form. I have tried this: set vProfile = $Get(%request.Data("profile",1), but it only returned an empty value :(
go to post Emil Odobasic · Jan 8 Hello! I have read it, and tried multiple things but nothing seems to work :( I have tried these already: set vProfile = %request.Get("profile") set vProfile = $Get(%request.Data("profile"))set vProfile = $Get(%request.MimeData("profile"))and set vProfile = %request.GetMimeData("profile")
go to post Emil Odobasic · Jan 2 Hello Ashok! :) Thanks for your answer. I am still having trouble getting the value of the string that is being sent into my webservice. The key is testParam, but it doesn't seem to work as it is now with "Get". Do you have any tips on what to do instead? :)