UI::WebDialog with POST doesn't put content-type field in header


#1

Hi, we want to send access tokens and other parameters to our web server via POST because only this type of method is supported on server side. We chose the WebDialog for this task because HtmlDialog doesn’t provide any post method. I checked the message posted by the dialog and saw that there was no content-type field in the
http header and our servers respond to this kind of request with error (according to https://tools.ietf.org/html/rfc7231#section-3.1.1.5 the post should include content-type).
Could you please help me out how could we send a http post in WebDialog with content-type? Is there a way to include header fields via the API? Or is it possible to use HtmlDialog for this request also?

Thanks
Podri


#2

Did you see http://ruby.sketchup.com/Sketchup/Http/Request.html?


#3

Thanks :slight_smile: Ok, we could use a simple a http request for a one shot request but we need the browser functionality of the webdialog because the user want to browse the site after logged in. So is there a way to use this browser (webdialog or htmldialog) and send valid post requests?


#4

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.