Sending a HTTP request in Scala -


How can I send an HTTP request

?

This JSON formatted response in Scala and Paras.

Thank you in advance.

Here is an example Dispatch and JSON4s .import default by import. _ Import org.json4s._ JsonMethods._ val translateAPI = url (based on " As well as the string.) Val json = parse (response ()) // () Dispatches and forces are added to wait for the result forever == Wait. Results (feedback, forever)

To get the libraries you need to add the following to your buildfile. : Examples for SBT

  libraryDependencies + = "org.json4s" %% "json4s-jackson"% "3.2.8" library depression + = "net databender dyspatch" %% "dispatch-core "%" 0.11.0 "  

You have done without the URL parameters and credentials in the example, without which you will get a 400-error but if you can fix that problem , Then he should work.

Comments

Popular posts from this blog

sql - Postgresql record to array -

c++ - Cmake produces file extensions in static library archives -

java - Clearing application data programatically android -