Giter Site home page Giter Site logo

ng-zorro / rebirth-http Goto Github PK

View Code? Open in Web Editor NEW
57.0 7.0 12.0 356 KB

Java JPA like HTTP client for Angular. 🍙

License: MIT License

TypeScript 86.47% JavaScript 8.78% HTML 4.50% CSS 0.25%
rebirth-http decorators java-jpa angular2 http ajax rebirth

rebirth-http's People

Contributors

greengerong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rebirth-http's Issues

In which case will get null?

I saw the comment will get null if TypeScript Interface isn't visible in runtime, but why TypeScript Interface isn't visible? it's werid, I build an ionic app in dev, it works well, but when I build app with a -prod flag it is broken, then get null, so I want to know in which case TypeScript Interface isn't visible?

Fails to work in production mode

Hi ...
First of all, Thanks! I really appreciate the time and effort you've put into this module.

While testing your module I realized when using it in production mode the library fails
to work properly.
The error message I am getting is:

invalid assignment to const `n'

This happens when I make a HTTP request and the app stops working afterwards.
I tested this in latest version of angular

rebirth-http Roadmap 2020 Summer

Feature

Refactor

  • extract the core so it could be reused in other framework / no framework
  • update to latest TypeScript and Angular

Doc

  • Docsite

Suggestions welcomed! ☕

Query don't support empty character string

In my work, I find use @query parameter send a empty character string but don't send this field actually. Through review source code, I find this code ,

       .filter(p => args[p.parameterIndex]) // filter out optional parameters

there,
I think url query parameter should support empty character string, so it's can modify to

       .filter(p => args[p.parameterIndex] || args[p.parameterIndex] === '') // filter out optional parameters

what do you think of that? @greengerong ☺️

About the rebirthHttpProvider·s action scope

hello @greengerong
狼主你好,发现有一个服务作用域的问题:根据您的api在app.component中进行Global interceptors,当我的service是在AppModule中进行provide,或者在其他子模块块中provide,且要将该子模块import到AppModule的话,那没问题;但如果我是用的懒加载方式创建路由,并且有部分service在懒加载模块中声明,那在这里面的service将无法被Rebirth-http包装。
image

请问这个问题能怎么解决,或者不知道是我还有什么地方没配置好?谢谢

您好,问个问题

您好,我用您这个http之后发现请求2次,我用angular自带http,只有一次请求,这是什么情况

"the request was rejected because no multipart boundary was found"

@Headers({ 'Content-Type': 'multipart/form-data' }) @POST('/apps') addApk(@Body formData: FormData, @Query('params') params: { version: string, description: string }): Observable<Result<{ id: number, type: string, url: string }>> { return null; }
---service end---
this.service.add(formData, { version : this.formCache.version, description: this.formCache.description }).subscribe( res => { // ... }, err => { // ... } );
--- component end---

when I post a upload request, here's my feedback:
Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found

should I add the bounary by myself ?

@Query 装饰器声明的对象有问题

rebirth-http 版本 0.1.3

错误代码位置

错误代码位置

问题描述

当使用 @get@query 配合使用的时候,@query 声明的对象会出问题!比如下面的伪代码,最后请求的地址是 https://ip:port/page?end=2017-01-01,start 参数没有被整合到 url 中,进 debug 发现是 错误代码位置 的 result 每次都被 ps.set(k, value[k]) 覆盖,导致遍历的时候,result 只会保存最后一次遍历的属性

伪代码

export class QueryPageRequest {
    public start: string;
    public end: string;
}

service:

@GET('/page')
queryByPage(@Query('req') req: QueryPageRequest) :Observable<any> {
    return null;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.