question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle response message

See original GitHub issue
...

https://groups.google.com/forum/#!topic/nativescript/71SOZAGwo_g

As I mentioned there, your plugin fits our needs in nearly all points. We just need to process our own Server-response in the NativeScript-App.
I analyzed the plugin code and the android-fileupload-service. The Java-code seems to pass the server response message and the response code.

intent.putExtra(STATUS, STATUS_COMPLETED);
intent.putExtra(SERVER_RESPONSE_CODE, responseCode);
intent.putExtra(SERVER_RESPONSE_MESSAGE, filteredMessage);
In the onCompleted-Event of your ProgressReceiver, you get the responseCode and the responseMessage, but you do not process this data.

...

Regards,
Felix

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:25 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
developper89commented, Oct 6, 2016

`URLSessionDataTaskDidReceiveData(session, dataTask, data) { //console.log(“URLSessionDataTaskDidReceiveData”); // we have a response in the data…

let jsonString = new NSString({ data: data, encoding: NSUTF8StringEncoding });
let json = JSON.parse(jsonString.toString())
// do what you want with your data
console.log(JSON.stringify(json))

}`

3reactions
developper89commented, May 18, 2017

@Ericky14 task.on("responded", (e) => { let res = JSON.parse(e.data) })

Read more comments on GitHub >

github_iconTop Results From Across the Web

Best Practices for REST API Error Handling - Baeldung
3.1.​​ The simplest way we handle errors is to respond with an appropriate status code. Here are some common response codes: 400 Bad...
Read more >
HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >
Best Practices for API Error Handling - Nordic APIs
Today, we're going to talk about exactly why error responses and handling approaches are so useful and important.
Read more >
Handle errors in ASP.NET Core web APIs - Microsoft Learn
In this article. Developer Exception Page; Exception handler; Use exceptions to modify the response; Validation failure error response; Client ...
Read more >
API Response error handling in the best way | by Hafiq Iqmal
A good error handling give additional information about the underlying fault, as well as lessen your time on debugging and also give user ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found