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 To get the libraries you need to add the following to your buildfile. : Examples for SBT 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. .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)
libraryDependencies + = "org.json4s" %% "json4s-jackson"% "3.2.8" library depression + = "net databender dyspatch" %% "dispatch-core "%" 0.11.0 "
Comments
Post a Comment