Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an XML Http Request?

In phoenixframework, I need to create a post request, to send parameters to another server.

As I am newcomer to elixir, I am wondering how would I do so? is there a library for this purpose? or is it possible to initiate a post request without installing a new library? how?

like image 430
simo Avatar asked Jun 08 '26 22:06

simo


1 Answers

You can use libraries such as httpoison to make http requests from any elixir code.

Note that XMLHttpRequest is a browser api for making http requests (and it's been a long time since it wasn't XML specific at all) - there's nothing 'special' about those requests in general. Many js libraries (including Jquery, prototype, etc) add a X-Requested-With header but that's just a convention.

like image 158
Frederick Cheung Avatar answered Jun 11 '26 22:06

Frederick Cheung



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!